Hi TW, You might want to investigate the command 'printf', it's rarely implemented by the shell and has consistent behaviour (no implicit NL etc) across different platforms. For that reason many shell script writers shy away from echo and use printf instead. See man 1 printf for details. Hope that helps, Andrew On Thursday 11 March 2010, TW wrote: > 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 -- 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