Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: POSIX compliance of shells - where to ask/talk about it?



igloo@xxxxxxxx (Ian Lynagh) writes:

|> Hi all,
|> 
|> Where should one ask/talk about POSIX shell compliance (looking for a
|> mailing list probably)?
|> 
|> I am reading the standard at
|> http://www.opengroup.org/onlinepubs/007904975/utilities/xcu_chap02.html
|> and finding it very imprecise - disappointingly so (am I looking in the
|> wrong place?). I am therefore looking to implementations to clarify the
|> standard, but with things like this (all shells invoked as sh, bash
|> given --posix):
|> 
|> printf "%s\n" `echo '\\\\\\\\\\\\\\\\'`
|> printf "%s\n" "`echo '\\\\\\\\\\\\\\\\'`"
|> 
|> Using shells/ash:
|> \\\\
|> \\\\
|> 
|> Using shells/bash:
|> \\\\\\\\
|> \\\\\\\\
|> 
|> Using shells/zsh:
|> \\\\
|> \\\\\\\\

I think the key difference here is whether echo is interpreting
backslashes or not.  By default, bash's builtin echo does not interpret
backslashes, and if you use "echo -e" you get the same output as ash.  zsh
seems to be the odd case again.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@xxxxxxx
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



Messages sorted by: Reverse Date, Date, Thread, Author