'\"macro stdmacro
.if n .pH g1.cmp @(#)cmp	40.3 of 10/10/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} cmp 1 "Essential Utilities" "\&"
.if \nX=1 .ds x} cmp 1 "Essential Utilities"
.if \nX=2 .ds x} cmp 1 "" "\&"
.if \nX=3 .ds x} cmp "" "" "\&"
.TH \*(x}
.SH NAME
\f4cmp\f1 \- compare two files
.SH SYNOPSIS
\f4cmp\f1
[
\f4\-l\f1
] [
\f4\-s\f1
]
\f2file1 file2\f1
.SH DESCRIPTION
The two files are
compared.
(If
.I file1\^
is
\f4\-\f1,
the standard input is used.)
Under default options,
\f4cmp\fP
makes no comment if the files are the same;
if they differ, it announces the byte and line number
at which the difference occurred.
If one file is an initial subsequence
of the other, that fact is noted.
.P
Options:
.TP
\f4 \-l\f1
Print the byte number (decimal) and the
differing bytes (octal) for each difference.
.TP
\f4 \-s\f1
Print nothing for differing files;
return codes only.
.dt
.SH "SEE ALSO"
\f4comm\fP(1), \f4diff\fP(1).
.SH DIAGNOSTICS
Exit code \f40\f1 is returned for identical
files, \f41\f1 for different files, and \f42\f1 for an
inaccessible or missing argument.
.\"	@(#)cmp.1	6.2 of 9/2/83
