Re: piping escape into dosemu

TW <[email protected]>
Newsgroups org.kernel.vger.linux-msdos
Message-ID <[email protected]>
2010/3/11 Mike McCarty <[email protected]>:
>
> In fact...
>
> $ echo -ne "\033" | od -x
> 0000000 001b
> 0000001
>
> So, od got exactly one character, which was an ESC.
>

O.K., one more pitfall.  Obviously, the shells use their own internal
echo and don't call /bin/echo.  sh and dash give me

$ echo -ne "\033" | od -x
0000000 6e2d 2065 0a1b
0000006

i.e. echo is actually echoing the switch "-ne", followed by a space,
ESC and newline.  In bash, I get

tom@tom-desktop:~$ echo --version
--version
tom@tom-desktop:~$ /bin/echo --version
echo (GNU coreutils) 7.4
Copyright © 2009 Free Software Foundation, Inc.
Lizenz GPLv3+: GNU GPL Version 3 oder höher <http://gnu.org/licenses/gpl.html>
Dies ist freie Software: Sie können sie ändern und weitergeben.
Es gibt keinerlei Garantien, soweit wie es das Gesetz erlaubt.

Geschrieben von Brian Fox und Chet Ramey.

I'll be using /bin/echo now to make sure the same echo is used in bash and sh.
--
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.