On Fri, Nov 24, 2017 at 1:07 AM, Arun Vimalathithen
<[email protected]> wrote:
> It works to a certain extent (with --verbose) where lines from the
> executed commands show up in the console (Not sure if everything is
> showing up). But the output shows up at the end of all execution. As
> there might be a lot of events being performed the execution might
> take 30 - 40 mins and I would like to display the commands as they are
> executed. Is there any way to do this?
Both -u and --linebuffer do exactly that:
slow_seq() {
seq "$@" |
perl -ne '$|=1; for(split//){ print; select($a,$a,$a,0.300);}'
}
export -f slow_seq
seq 5 | parallel -P0 --tagstring 'Job {#}' --line-buffer slow_seq {}
/Ole