parallel
[Top][All Lists]
Advanced

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

Re: Problems to reuse --eta output


From: Pacho Ramos
Subject: Re: Problems to reuse --eta output
Date: Wed, 10 Jan 2018 09:44:32 +0100

Sorry to bother you again but, with --bar I get the same issues as with --eta: if I put its output to a file, I can only read that file with "more" and see something meaningful like
#   0 sec 30                                                                                                                                                                                                                                                                              
0% 0:1000=0s 30                                                                                                                                                                                                                                                                     
#   0 sec 30                                                                                                                                                                                                                                                                              
0% 0:1000=0s 30
...

Otherwise, when I try to play with "cut" that file, I only see the last line... even a plain "cat file" shows me the last line. For example in the attached file (coming from "seq 1000 | parallel -j30 --bar '(echo {};sleep 1)' 2> /tmp/output") I can only play with the last line:
6% 60:940=29s 90                                                                                                                                                                                                                                                                         

Even "tail -n3..." only shows me the last line

Thanks a lot

2018-01-03 1:16 GMT+01:00 Ole Tange <ole@tange.dk>:
On Mon, Dec 18, 2017 at 12:11 PM, Pacho Ramos <pachoramos@gmail.com> wrote:

> I am trying to let users to get meaningful time remaining measurements from
> the parallel output.

Use --bar.

The output from --bar is deceptive: When output to the terminal it
looks like a walking bar, but in reality the format also contains data
that can be used by zenity:

             seq 1000 | parallel -j30 --bar '(echo {};sleep 0.1)' \
               2> >(zenity --progress --auto-kill) | wc

The format is:
\r
# $eta_seconds sec $arg\r
$pct_complete\r
the bar that you see

So if you read that output with \r as your line separator, then you
should fairly easily be able to get the progress information simply by
looking at every third line.


/Ole


reply via email to

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