bug-bash
[Top][All Lists]
Advanced

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

Re: output redirection with process substitution asynchronous?


From: pjodrr
Subject: Re: output redirection with process substitution asynchronous?
Date: Sat, 5 Dec 2009 01:04:05 -0800 (PST)
User-agent: G2/1.0

On Dec 4, 7:46 pm, DennisW <address@hidden> wrote:
>
> This should be in gnu.bash rather than gnu.bash.bug

oh, you are right, it's not a bug yet

> Would this work for you?
>
> while read line; do echo "$(date): $line $((num++))"; done

ah sorry, I used the command "seq" just as an example, it could
be any other command that produces output, should have probably
written like:

$ exec 3> >(while read line; do echo "$(date): $line"; done)
$ <some command that produces some output> >&3
Friday, December  4, 2009  4:20:29 PM MET: 1
$ Friday, December  4, 2009  4:20:29 PM MET: 2
Friday, December  4, 2009  4:20:29 PM MET: 3
Friday, December  4, 2009  4:20:29 PM MET: 4

thanks,

  Peter


reply via email to

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