[Top][All Lists]

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

echo: octal escapes dont work

From: Pigeon
Subject: echo: octal escapes dont work
Date: Sat, 30 Nov 2002 19:24:44 +0000

= 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 address@hidden

= 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]