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: Marc Herbert
Subject: Re: output redirection with process substitution asynchronous?
Date: Mon, 07 Dec 2009 10:21:18 +0000
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

> pjodrr wrote:
> It would be nice if you explained what it is you're attempting to do, rather 
> than ask for a solution for what you're thinking would do that.

To be honest that is the first thing he (tried to) do:

pjodrr wrote:
> how can I prefix every line of output of some command with a
> timestamp? 


What is wrong with the following:

prefix_with_date () 
{ 
    while read; do
        printf '%s: %s\n' "$(date)" "$REPLY";
    done
}

seq 4 | prefix_with_date
ls | prefix_with_date





reply via email to

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