[Top][All Lists]

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

[Bug-tar] Error in manual for 'Running External Commands'

From: Serge van den Boom
Subject: [Bug-tar] Error in manual for 'Running External Commands'
Date: Sat, 9 Aug 2014 20:05:13 +0200 (CEST)
User-agent: Alpine 2.00 (BSF 1167 2008-08-23)


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 

Though I'd personally recommend the following:

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

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.



reply via email to

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