bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] --test-label is not quiet upon a mismatch


From: Benno Schulenberg
Subject: [Bug-tar] --test-label is not quiet upon a mismatch
Date: Thu, 01 Apr 2010 21:32:29 +0200

Hello archivers,

An example:

$ src/tar --test-label --file=../floeps.tgz
Barha

A successful actual test is quiet, as the manual says:

$ src/tar --test-label --file=../floeps.tgz Barha
$ echo $?
0

But a failing test produces a confusing error message:

$ src/tar --test-label --file=../floeps.tgz Negative
src/tar: Negative: Not found in archive
src/tar: Exiting with failure status due to previous errors
$ echo $?
2

The manual says this:

   If `--test-label' is used with a single command line argument, `tar'
compares the volume label with the argument.  It exits with code 0 if
the two strings match, and with code 2 otherwise.  In this case no
output is displayed.  For example:

     $ tar --test-label --file=iamanarchive 'iamalable'
     => 0
     $ tar --test-label --file=iamanarchive 'iamalable' alabel
     => 1

That last 1 should be 2, methinks.  And " 'iamalable' alabel" would
have to be something like "'adifferentlable'", no?  And "In this case"
would be clearer as "In these cases".  Or does it apply only to the
matching case?

$ src/tar --version | head -1
tar (GNU tar) 1.23

(Please CC, not subscribed.)

Regards,

Benno

-- 
http://www.fastmail.fm - IMAP accessible web-mail





reply via email to

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