2020-04-03 16:24:17 (UTC-03:00)
Marcel Rodrigues <marcelgmr@gmail.com>
improve examples in documentation
diff --git a/README b/README index f57c756..ff1c207 100644 --- a/README +++ b/README @@ -27,9 +27,14 @@ OPTIONS EXAMPLES Use seq(1) to test drive mpb: - $ n=5000; seq 1 $n | mpb -vsw50 $n + $ n=5000; seq $n | mpb -vsw50 $n - Show progress of tar(1) extraction: + Show path of file currently being extracted by tar(1) (without progress + bar): + $ tar vxf foo.tgz | mpb -v + + Pre-compute the number of files in archive to add extraction progress + bar: $ f=foo.tgz; n=$(tar tf $f | wc -l); tar vxf $f | mpb -v $n diff --git a/mpb.1 b/mpb.1 index 69c561d..707420d 100644 --- a/mpb.1 +++ b/mpb.1 @@ -28,11 +28,18 @@ if \fITOTAL\fR is not given or it is zero, the progress bar will not be shown Use \fBseq(1)\fR to test drive \fBmpb\fR: .RS .nf -$ n=5000; seq 1 $n | mpb -vsw50 $n +$ n=5000; seq $n | mpb -vsw50 $n .fi .RE .PP -Show progress of \fBtar(1)\fR extraction: +Show path of file currently being extracted by \fBtar(1)\fR (without progress bar): +.RS +.nf +$ tar vxf foo.tgz | mpb -v +.fi +.RE +.PP +Pre-compute the number of files in archive to add extraction progress bar: .RS .nf $ f=foo.tgz; n=$(tar tf $f | wc -l); tar vxf $f | mpb -v $n