bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lost output from asynchronous lists


From: Stephane Chazelas
Subject: Re: lost output from asynchronous lists
Date: Wed, 29 Oct 2008 09:32:16 +0000
User-agent: Mutt/1.5.16 (2007-09-19)

On Tue, Oct 28, 2008 at 10:51:13PM +0100, Ralf Wildenhues wrote:
[...]
> > : > stdout > stderr
[...]
> Yes.  For shell portability, I'll write the first line as
>   : > stdout
>   : > stderr
> 
> though.

Why?

I can't see why ": > stdout > stderr" wouldn't work in any
shell. It should even work in non-Bourne ones such as csh, it
would also work in "rc" (on systems where there's a /bin/:). It
should even work in the Bourne shell from Unix V7 and the
pre-Bourne ones in earlier versions.

[...]
> +  ( $at_traceon; $1 ) >>"$at_stdout" 2>>"$at_stder1"

I've not read the full code so I don't know what $1 may contain,
but I wonder whether eval "$1" shouldn't be preferable here (in
case $1 is meant to contain a shell command line as opposed to a
space separated list of wildcards).

>    at_func_filter_trace $?
>  else
> -  ( :; $1 ) >"$at_stdout" 2>"$at_stderr"
> +  : >"$at_stderr"
> +  ( :; $1 ) >>"$at_stdout" 2>>"$at_stderr"

What's the ":;" for?

-- 
Stéphane




reply via email to

[Prev in Thread] Current Thread [Next in Thread]