bug-bash
[Top][All Lists]
Advanced

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

Re: echo "-e" produces no outputs


From: Bauke Jan Douma
Subject: Re: echo "-e" produces no outputs
Date: Fri, 17 Jul 2009 21:57:26 +0200
User-agent: Thunderbird 2.0.0.22 (X11/20090608)

Eric Blake wrote on 07/17/2009 09:09 PM:
-----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'


or:
echo -n "-" ; echo "e"

bjd




reply via email to

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