Subject: Re: ksh vs sh quoting
To: Patrick Welche <email@example.com>
From: Patrick Welche <firstname.lastname@example.org>
Date: 07/27/2004 17:08:51
On Tue, Jul 27, 2004 at 04:29:47PM +0100, Patrick Welche wrote:
> Any thoughts on what's up with the quoting?
All explained in TFM.. ksh(1)
The following is a list of things that are affected by the state of the
o \" inside double quoted `..` command substitutions: in posix
mode, the \" is interpreted when the command is interpreted; in
non-posix mode, the backslash is stripped before the command
substitution is interpreted. For example, echo "`echo \"hi\"`"
produces `"hi"' in posix mode, `hi' in non-posix mode. To avoid
problems, use the $(...) form of command substitution.
So it seems sh does the non-posix mode, and ksh by default does the posix
mode.. Sure enough set +o posix fixed things for me..