> 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