home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Guide / c-cplusplus-interactive-guide.iso / c_ref / csource4 / 224_01 / cmp.hlp < prev    next >
Encoding:
Text File  |  1987-01-06  |  896 b   |  31 lines

  1. NAME
  2.      cmp - compare two files
  3.  
  4. SYNTAX
  5.      cmp [ -l ] [ -s ] file1 file2
  6.  
  7. DESCRIPTION
  8.      The two files are compared.  (If file1 is '-', the standard
  9.      input is used.) Under default options, cmp makes no comment
  10.      if the files are the same.  If they differ, it announces the
  11.      byte and line number at which the difference occurred.  If
  12.      one file is an initial subsequence of the other, that fact
  13.      is noted.
  14.  
  15.      Options:
  16.  
  17.      -l    Print the byte number (decimal) and the differing
  18.            bytes (octal) for each difference.
  19.  
  20.      -s    Print nothing for differing files; return codes only.
  21.  
  22. SEE ALSO
  23.      diff, comm
  24.  
  25. DIAGNOSTICS
  26.      Exit code 0 is returned for identical files, 1 for different
  27.      files, and 2 for an inaccessible or missing argument.
  28.  
  29. RESTRICTIONS
  30.      Only one option may be specified at a time.
  31.