sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

cmp.1 (774B)


      1 .Dd 2015-10-08
      2 .Dt CMP 1
      3 .Os sbase
      4 .Sh NAME
      5 .Nm cmp
      6 .Nd compare two files
      7 .Sh SYNOPSIS
      8 .Nm
      9 .Op Fl l | Fl s
     10 .Ar file1 file2
     11 .Sh DESCRIPTION
     12 .Nm
     13 compares
     14 .Ar file1
     15 and
     16 .Ar file2
     17 byte by byte. If they differ,
     18 .Nm
     19 writes the first differing byte- and line-number to stdout.
     20 .Sh OPTIONS
     21 .Bl -tag -width Ds
     22 .It Fl l
     23 Print byte-number and bytes (in octal) for each difference.
     24 .It Fl s
     25 Print nothing and only return status.
     26 .El
     27 .Sh EXIT STATUS
     28 .Bl -tag -width Ds
     29 .It 0
     30 .Ar file1
     31 and
     32 .Ar file2
     33 are identical.
     34 .It 1
     35 .Ar file1
     36 and
     37 .Ar file2
     38 are different.
     39 .It > 1
     40 An error occurred.
     41 .El
     42 .Sh SEE ALSO
     43 .Xr comm 1 ,
     44 .Xr diff 1
     45 .Sh STANDARDS
     46 The
     47 .Nm
     48 utility is compliant with the
     49 .St -p1003.1-2013
     50 specification.
     51 .Pp
     52 The "char" in the default result format has been replaced with "byte".