On Fri, Oct 09, 2009 at 11:57:04PM +0400, Michael Tokarev wrote:
> The dash's built-in echo command expands \nnn-style sequences, like 
> this:
> 
>  $ echo 'a\165b'
>  aub
> 
> No other shells I know does that.  The result is *very* difficult to 
> find bugs elsewhere, hence the severity.
> 
> With introduction of dash as default /bin/sh, the importance of this
> issue increases.
> 
> See also #379227 and #489705 which are the same issue.
> 
> Most modern shells has an option to turn on that escape sequence 
> expansion, -e, and recognizes more escape sequences (like \xnn 
> hexadecimal sequences, \n\r\t symbolic sequences and so on).
> 
> See also http://marc.info/?l=linux-kernel&m=125509847805427&w=2 - an 
> un-imaginable, or even impossible bug in kernel which, after almost a 
> week (and a difficult week it was) turned out to be wrong interpretation 
> of `echo -ne' (it's non-standard so there's no requiriment to support 
> this option in dash, yet most other modern shells supports it as 
> mentioned above), and also 
> http://marc.info/?l=linux-kernel&m=125511756906369&w=2

Hi, I'm not sure what you are after.  dash implements POSIX
ieee1003.1-2004, and Debian policy; it implements some XSI extension.
AFAICS the behavior of dash's echo is just fine with these standards.

Yes, using echo isn't portable, posix says
"It is not possible to use echo portably across all POSIX systems unless
both -n (as the first argument) and escape sequences are omitted.

The printf utility can be used portably to emulate any of the
traditional behaviors of the echo utility"...

So what change in the behavior do you suggest?

Regards, Gerrit.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to