On Tue, Nov 03, 2009 at 02:30:36PM +0000, Thorsten Glaser wrote:
> Hi,
>
> actually, other shells do:
> * posh (bug)
> * mksh (bug, fixed in -current, fixed in Debian 39.1-4, only in sh mode)
> * maybe others
>
> I’ve read POSIX and Debian Policy to get an understanding of this.
> POSIX basically says, either you support -n or you do XSI, which
> contains backslash escaping. Debian Policy says you do the -n thing.
> So you mustn’t do backslash expansion in echo if called as /bin/sh
> (note mksh called as /bin/mksh{,-static} will still do that), and
> everything else is a bug. Took me a while to figure out what is cor-
> rect, though…
Again, I read
If the first operand is -n, or if any of the operands contain a
backslash ( '\' ) character, the results are
implementation-defined.
as invalidating your "either-or" mandate.
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]