[Top][All Lists]

[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: Gecko/20060719 Thunderbird/ Mnenhy/

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:
Another big problem is that people tend to use -e, which will be
   by other shells and brakes the output.

   echo '\a'

   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).

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]