Red Hat Bugzilla – Bug 164287
ksh no longer works properly for "echo -e" (prints the -e)
Last modified: 2007-11-30 17:11:10 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.9) Gecko/20050711 Firefox/1.0.5
Description of problem:
$ echo "-e foo\c"
$ type echo
echo is a shell builtin
ksh man page sez:
echo [ arg ... ]
When the first arg does not begin with a -, and none of the argu-
ments contain a \, then echo prints each of its argumentsseparated
by a space and terminated by a new-line. Otherwise, the behavior
of echo is system dependent and print or printf describedbelow
should be used. See echo(1) for usage and description.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. see Description above
Well, the first arg begins with a '-', therefore the behaviour of echo IS system
dependent. You'd better use either /bin/echo or the builtins print/printf.