Sigh. Someday maybe I'll decide not to answer email in the middle of the night when I've been taking decongestants. On Mon, 16 Aug 2004, Aaron Davies wrote: > On Monday, August 16, 2004, at 03:41 AM, Bart Schaefer wrote: > > > What happens when one of the arguments of the command is a quoted word > > containing spaces? [...] > > sleep 30 & > > runcommandonpidof sleep print -l "this should be on one line" > > > > (and try it in a non-zsh shell, where word splitting applies; no > > cheating by letting zsh preserve the quoting for you, you asked for > > portability). > > What is "print"? As has been pointed out by Raśl, I've been telling you to avoid zsh while giving an example that uses a zsh builtin. > toall sleep echo "this is one line" > > produces > > this is one line 19980 > > whether or not $@ is in quotes. Try this one: toall sleep echo "this has ten spaces" With $@, you should get this has ten spaces 19980 Whereas "$@" should give this has ten spaces 19980 On Mon, 16 Aug 2004, Aaron Davies wrote: > I'm running this under Bourne sh, as I mentioned in my original request. And I should have remembered, as Dan Nelson mentioned, that $pipestatus is only available in bash and zsh and therefore not portable.