missing exit status for CMP(1)

View: New views
4 Messages — Rating Filter:   Alert me  

missing exit status for CMP(1)

by Kurt Bigler :: Rate this Message:

| View Threaded | Show Only this Message

Hi,

man cmp contains no info about exit status, although exit status is
mentioned in relation to the -s option and I know I've used it in the past,
so trial and error will tell me which way it works.

I'm seeing this on Snow Leopard (10.6.7) and the man page announces:


diffutils 2.8.1                 April 2002                         CMP(1)



Thanks.

-Kurt Bigler




Re: missing exit status for CMP(1)

by Bob Proulx :: Rate this Message:

| View Threaded | Show Only this Message

Kurt Bigler wrote:
> man cmp contains no info about exit status, although exit status is
> mentioned in relation to the -s option and I know I've used it in the past,
> so trial and error will tell me which way it works.

The Texinfo format is the preferred documentation format for the GNU
Project.  In the man page it says this:

       The full documentation for cmp is maintained as a Texinfo
       manual.  If the info and cmp programs are properly installed at
       your site, the command

              info cmp

       should give you access to the complete manual.

Note that if you are a "vi" person then you may want to use the
'info --vi-keys' option (or use the 'pinfo' command) which uses
vi-like key bindings for navigation.

In the Texinfo documentation it says:

     An exit status of 0 means no differences were found, 1 means some
  differences were found, and 2 means trouble.

Bob


Parent Message unknown Re: missing exit status for CMP(1)

by Bob Proulx :: Rate this Message:

| View Threaded | Show Only this Message

Kurt Bigler wrote:
> Thanks.  I did look in textinfo cmp and somehow failed to see this.  But it
> was my first time with textinfo and I was disoriented.
>
> It does not seem worth learning textinfo in a terminal setting (something
> new done an old way), will try to figure out how to get at it from the web,
> or the corresponding best thing.  Any quick pointers?  I seem to have found
> documentation *about* Textinfo on the web but not not the rest.

The documentation for most GNU project software is available online as
html and available through your web browser.  The disadvantage is that
it will usually be the latest release and may not match the version
that is installed.

For diffutils (and for most projects):

  http://www.gnu.org/software/diffutils/

  http://www.gnu.org/manual/

Then the documentation page for diffutils:

  http://www.gnu.org/software/diffutils/manual/

I would use the "one web page per node" version.

  http://www.gnu.org/software/diffutils/manual/html_node/index.html

And the cmp page in particular is here:

  http://www.gnu.org/software/diffutils/manual/html_node/Invoking-cmp.html#Invoking-cmp

Hope that helps!
Bob


Re: missing exit status for CMP(1)

by Jim Meyering :: Rate this Message:

| View Threaded | Show Only this Message

Kurt Bigler wrote:
> man cmp contains no info about exit status, although exit status is
> mentioned in relation to the -s option and I know I've used it in the past,
> so trial and error will tell me which way it works.
>
> I'm seeing this on Snow Leopard (10.6.7) and the man page announces:
>
> diffutils 2.8.1                 April 2002                         CMP(1)

That version is um... a little old.  Almost 10 years old.
If you upgrade to diffutils-3.2, you'll see that the man page now says this:

    If a FILE is `-' or missing, read standard input.
    Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.