add cmp, thanks stateless

This commit is contained in:
Connor Lane Smith
2011-06-10 01:55:12 +01:00
parent 17a81ace44
commit 188d8ff93a
3 changed files with 89 additions and 0 deletions

25
cmp.1 Normal file
View File

@@ -0,0 +1,25 @@
.TH CMP 1 sbase\-VERSION
.SH NAME
CMP \- compare two files
.SH SYNOPSIS
.B cmp
.RB [ \-ls ]
.RI file1
.RI file2
.SH DESCRIPTION
.B cmp
compares two files byte by byte. If the files differ, cmp prints the byte and
line number at which the difference occurred.
.P
The status code is 0 if the files are identical, and 1 if not. If an error
occurred the status code is 2.
.SH OPTIONS
.TP
.B \-l
prints the byte number, and the differing bytes (in octal), for each difference.
.TP
.B \-s
prints nothing, only returns status.
.SH SEE ALSO
.IR comm (1),
.IR diff (1)