Re: Bug in bash
On Tue, 2 Oct 2001 11:51:09 +0200 (CEST), Wouter Verhelst <firstname.lastname@example.org> said:
> On 1 Oct 2001, Roderick Schertler wrote:
>> POSIX says that echo does handle the \ escapes, and doesn't honor
>> -n. Neither bash nor ash (both invoked as sh) behaves quite this
> Actually, ash does, at least if you use the internal version of echo
> in ash.
It doesn't. Perhaps you only checked half of the behavior. Its internal
echo honors the \ escapes (as POSIX says it should), but it also honors
-n (which POSIX says it mustn't).
$ type sh
sh is /bin/sh
$ ls -l /bin/sh
lrwxrwxrwx 1 root root 3 Oct 1 23:21 /bin/sh -> ash
$ sh -c 'echo -n foo; type echo'
fooecho is a shell builtin