from looking at the example the space between "/usr/bin/echo" and "-d" is not evident, and a cut/paste from your message completely missed the space, but ksh93 -v caught it
the ability to cut/paste and re-enter -x output is a big advantage, and in many cases shows how misleading other shell -x implementation are you will be lucky to find any two shell implementation variants that produce the same -x output some expand $PS1, some print it unexpanded, some summarily use "+ " some use '...' to quote the newline, some don't quote at all, ksh93 uses $'...' some fail to list > < redirections at all so w.r.t -x, for any given shell, "incompatibile with other shells" seems to be the norm On Mon, 16 Aug 2010 09:50:42 -0600 (MDT) bugmail-sen...@sun.com wrote: > *Synopsis*: ksh93 script has problem with newline > === *Description* ============================================================ > Such simple script like: > #!/bin/sh > set -vx > COMMAND="/usr/bin/echo > -d passwd" > echo "$COMMAND" > has very strange output: > $ ./testbug.sh > COMMAND="/usr/bin/echo > -d passwd" > + COMMAND=$'/usr/bin/echo \n-d passwd' > echo "$COMMAND" > + echo $'/usr/bin/echo \n-d passwd' > /usr/bin/echo > -d passwd > "$'/usr/bin/echo \n-d passwd' is different from other shells and it is used > only in case that there is newline (and other shells probably). > From ksh93 FAQ: > Q5. What is the purpose of $'...'? > A5. The $'...' option was added to ksh93 to solve the problem > of entering special characters in scripts. It uses > ANSI-C rules to translate the string between the '...'. > It would have been cleaner to have all "..." strings handle > ANSI-C escapes, but that would not be backwards compatible. > Well, this is incompatible with other shells, misleading and awkward. _______________________________________________ ksh93-integration-discuss mailing list ksh93-integration-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/ksh93-integration-discuss