DennisW wrote :
> Would you care to comment on the coproc command in Bash 4?

I wish I could, but I know nothing about it. Anyone else?


pjodrr wrote :
> But at least it became clear that the builtin process substitution is
> not the solution for me.

Wait! Maybe it is. I found a much nicer way to wait on the prefixer
process, if you can live with the "flock" dependency:

    prefix_with_date()
    {
        local somelock=$(tty)
        $@ > >(flock $somelock -c 'while read; do printf "%s: %s\n" "$(date)" 
"$REPLY"; done ')
        2>/dev/null flock $somelock :
    }

    prefix_with_date seq 10



Alternatives to flock might do; you got the idea.



Reply via email to