bug-bash
[Top][All Lists]
Advanced

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

Re: echo(1) non-conformant (processing -e and -E)


From: Eric Blake
Subject: Re: echo(1) non-conformant (processing -e and -E)
Date: Mon, 26 Nov 2007 21:36:54 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

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

According to Rich Felker on 11/26/2007 8:51 PM:
> POSIX leaves behavior unspecified when -n is the first argument, and
> also when any argument contains backslashes. However, if conformance
> to the XSI part of SUSv3 is also desired, -e must be default. I tend
> to think this is stupid, which you probably agree with, so I have no
> opinion on changing it to be XSI-conformant but I'm mentioning it
> anyway for completeness.

POSIX also states that echo is inherently non-portable, for these very
reasons, and recommends using printf(1) instead of echo(1).

- --
Don't work too hard, make some time for fun as well!

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

iD8DBQFHS57m84KuGfSFAYARAglAAKDOQUlF7oF5aUXsFKZecfirobA2UgCfd0X4
f/h3387RHiXENCuU8nwdB3w=
=c8Qq
-----END PGP SIGNATURE-----




reply via email to

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