Re: pre-2.0.31-7 nit picks

James Mastros (root@jennifer-unix.dyn.ml.org)
Thu, 21 Aug 1997 17:50:13 -0400 (EDT)


On Thu, 21 Aug 1997, Pete Harlan wrote:
> It's (possibly) worse than just requring quotes; echo does one write
> like this:
>
> $ strace echo "123 456 789"
> execve("/bin/echo", ["echo", "123 456 789"], [/* 28 vars */]) = 0
> ...
> write(1, "123 456 789\n", 12123 456 789
>
> but it does it in two writes if you run it like this:
>
> $ strace bash -c 'echo "123 456 789"'
> execve("/bin/bash", ["bash", "-c", "echo \"123 456 789\""], [/* 28 vars */])
> write(1, "123 456 789", 11123 456 789) = 11
> write(1, "\n", 1
>

But both put all the numbers in one write, so they should both be fine.

(Oh, and BTW, your wording is off, since these are two different programs.
(Bash has echo as a builtin.))

-=- James Mastros