bug-bash
[Top][All Lists]
Advanced

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

Re: cat.sh issue


From: Eric Blake
Subject: Re: cat.sh issue
Date: Tue, 24 Mar 2009 22:09:07 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666

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

According to address@hidden on 3/24/2009 9:20 PM:
> The question I have is why couldn't echo have a -- flag? Is it for POSIX or 
> some other kind of compatibility reasons? Is there any easier way to 
> accomplish what I want other than printf %s\\n "$var"?

You are correct: echo does not parse -- because of POSIX.  And POSIX is
also explicit that for portability, you are better off using printf than echo.
http://www.opengroup.org/onlinepubs/9699919799/utilities/echo.html

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

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

iEYEARECAAYFAknJrmMACgkQ84KuGfSFAYAKyACdEE0soJAS/QESe0IJb4P+tPAu
FwIAnj5EysavtkXtGxPFi8eb9dAkP6Dg
=ueDw
-----END PGP SIGNATURE-----




reply via email to

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