bug-coreutils
[Top][All Lists]
Advanced

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

Re: Bug: "echo -e "\0NNN" doesn't require leading '0'


From: Eric Blake
Subject: Re: Bug: "echo -e "\0NNN" doesn't require leading '0'
Date: Tue, 21 Mar 2006 21:35:47 -0700
User-agent: Thunderbird 1.5 (Windows/20051201)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to L. Walsh on 3/19/2006 1:19 PM:
> An incompatibility in echo has crept into the gnu version
> of echo.  In extended processing, the leading "0" is no
> longer required to start an octal sequence.  This is not
> compatible with other extended echo implementations and
> can cause un-anticipated side effects (like echoing "awk"
> replacement args "\1" into an awk input script).

Echo is inherently non-portable.  Implementations are allowed by POSIX to
support octal escapes without leading zeros as an extension to the XSI
required set of backslash sequences (POSIX only requires that portable
applications limit themselves to defined sequences, where the definition
includes the leading 0 for octal escapes).  Consider using printf instead.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEINQj84KuGfSFAYARAh+EAJ4/VwGqdORXB660limLrfoZQVUXQQCeOUkZ
EFl783N9j6+XXZLBRcD+oXY=
=nrxB
-----END PGP SIGNATURE-----




reply via email to

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