bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Bug in "cmp" man page: missing exit status value


From: Bruce Korb
Subject: Re: Bug in "cmp" man page: missing exit status value
Date: Sat, 08 Oct 2011 11:08:03 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11

On 10/08/11 10:44, Micah Cowan wrote:
(2011年10月05日 07:36), David Booth wrote:
The man page for cmp says of the -s option: "Output nothing; yield exit
status only."  But nowhere does it say what that exit status will be.

Hm. In my copy it's there:
"Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."

Could be different versions of diffutils, but then that only begs the
question as to why you didn't mention a version (as is customary in bug
reports). :)

Additionally, please note that GNU is not in the habit of placing the

Hi Micah,

Be careful which man page you look at.  There are two:  the one by
diffutils and the other from the Austin group (POSIX).  Current POSIX
says to have an EXIT STATUS section for POSIX specified commands.
coreutils creates man pages by massaging the usage output.  Does
diffutils follow this model?  I ask because the usage text
never contains exit status.

$ rpm -q -f $(which cmp)
diffutils-3.0-2.1.x86_64

The GNU man page says nothing about exit status, except that
--quiet only produces an exit status result.  POSIX man page:

EXIT STATUS
       The following exit values shall be returned:

        0     The files are identical.

        1     The files are different; this includes the case where  one  file
              is identical to the first part of the other.

       >1     An error occurred.



reply via email to

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