bug-bash
[Top][All Lists]
Advanced

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

Re: Espace characters need -e, wrong behaviour


From: mwoehlke
Subject: Re: Espace characters need -e, wrong behaviour
Date: Mon, 21 Aug 2006 10:40:54 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060719 Thunderbird/1.5.0.5 Mnenhy/0.7.4.0

Nico Schottelius wrote:
        Bash needs -e to react on escape characters.
   No other shell (afaik) does that (confirmed with dash, ksh and zsh),
   nor does posix specify that behaviour:
   http://www.opengroup.org/onlinepubs/009695399/utilities/echo.html
Another big problem is that people tend to use -e, which will be
printed
   by other shells and brakes the output.

Repeat-By:
   echo '\a'

Fix:
   Please remove the need for -e and ignore -e for a some time, until
   it vanished from user programs.

'echo' is known to be non-portable. If you are looking for portability, you should be using 'printf'.

Interestingly, this does seem to be inconsistent with many 'sh' implementations (I tried on a few old and exotic OS's), although it conforms to GNU 'echo' (the command, not the built-in).

--
Matthew
If you can't use a real OS, at least use Cygwin to fake one!





reply via email to

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