[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: piping escape into dosemu



2010/3/11 Mike McCarty <Mike.McCarty@xxxxxxxxxxxxx>:
>
> 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Linux Console]     [Audio]     [Hams]     [Kernel Newbies]     [Memory]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Camping]     [Yosemite Photos]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linux Resources]     [Fedora Users]

Add to Google Powered by Linux