[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: echo "-e" produces no outputs
From: |
Eric Blake |
Subject: |
Re: echo "-e" produces no outputs |
Date: |
Fri, 17 Jul 2009 13:09:56 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.22) Gecko/20090605 Thunderbird/2.0.0.22 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Huang Tao on 7/17/2009 9:46 AM:
> I'm not sure whether it is a bug
> how can i echo the text string "-e" barely ( or "-n", "-E")
> i tried
> $echo "-e"
> $echo '-e'
> and some other inputs, all of which produced no outputs.
Instead of using echo (which POSIX itself admits is fraught with
portability problems), use printf:
printf -- '-e\n'
- --
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
iEYEARECAAYFAkpgzIQACgkQ84KuGfSFAYCWiwCghvYg6Ffnt2gcNIuSDvucJN4m
t18AoJolQIl6iIzAfRod9vU4gw89tpH3
=bI3x
-----END PGP SIGNATURE-----