echo: octal escapes dont work
Pigeon <[email protected]> Sat, 30 Nov 2002 19:24:44 +0000
| Newsgroups | gmane.comp.gnu.sh-utils.bugs |
|---|---|
| Message-ID | <E18IDEK-0000OQ-00@pigeon> |
= Hi,
= I read:
$ /bin/echo --help
Usage: /bin/echo [OPTION]... [STRING]...
Echo the STRING(s) to standard output.
-n do not output the trailing newline
-e (unused)
-E disable interpolation of some sequences in STRINGs
--help display this help and exit (should be alone)
--version output version information and exit (should be alone)
Without -E, the following sequences are recognized and interpolated:
\NNN the character whose ASCII code is NNN (octal)
Report bugs to [email protected]
= So I do:
$ /bin/echo -ne \377 | hexd2
00000000: 33 37 37
$
= I should get 00000000: FF according to the above. Why don't I?
= Other escape sequences give similar results. (eg \100)
$ /bin/echo --version
echo (GNU sh-utils) 1.16
= Cheers,
= Pigeon