Hi,

The section '3.11 Running External Commands' in the manual of GNU tar (
https://www.gnu.org/software/tar/manual/tar.html#SEC54 ) includes the
following example:

    $ tar -x -f archive.tar \
        --checkpoint=exec='printf "%04d in %32s\r" $TAR_CHECKPOINT $TAR_ARCHIVE'

The parameters '--checkpoint' and '--checkpoint-action' are mixed up.
The correct syntax would be:

    $ tar -x -f archive.tar \
        --checkpoint-action=exec='printf "%04d in %32s\r" $TAR_CHECKPOINT 
$TAR_ARCHIVE'

Though I'd personally recommend the following:

    $ tar -x -f archive.tar \
        --checkpoint-action=exec='printf "%04d in %32s\r" "$TAR_CHECKPOINT" 
"$TAR_ARCHIVE"'

This has double quotes around "$TAR_ARCHIVE" in case readers want to use
the same syntax on files with spaces in them, and double quotes around
"$TAR_CHECKPOINT" just because it is good practice to put double quotes
around $VAR expressions.


Regards,

Serge


Reply via email to