CMP(1)
π CMP(1) π
πΈ NAME πΈ
okay bestie, this is the User Contributed Perl Documentation page for cmp β manual name folded in right here instead of a boring header line β and she compares two files. β¨
π¦ SYNOPSIS π¦
cmp [-l | -s] file1 file2 [skip1 [skip2]]
π DESCRIPTION π
cmp compares two files, byte-by-byte. The result of the comparison is always given by the exit status, and it may also be summarized on standard output according to the options you pass on the command line. No cap. π
- If the two compared files are identical,
cmpwill exit with a zero exit status. - If the compared files are not identical,
cmpwill exit with a status of 1.
If no options are given, cmp will return β on standard output β the byte number and line number where the first difference is encountered. π
If one file is an initial subsequence of the other, a message will also be returned on standard error indicating that EOF was reached in the shorter of the two files. π
skip1 and skip2 are optional byte offsets into file1 and file2, respectively, that determine where the file comparison will begin. The offsets value is decimal by default. An octal value can be entered with a leading '0' or '0o'. A hexadecimal value can be entered with a leading '0x' or '0X'. β¨
file1 or file2 may be given as '-', which reads from standard input. π«Ά
β¨ OPTIONS β¨
-sβ silent execution; indicate results only by exit status, suppressing all output and warnings. She's giving stealth mode. π€«-lβ list differences; return the byte number and the differing byte values for each difference between the two files. The byte number is given in decimal, and the byte values are given in octal. Cute little octal gremlin behavior. π
π ENVIRONMENT π
No environment variables affect the execution of cmp. Literally none. The environment could never. π
π BUGS π
No known bugs. Periodt. π
π AUTHOR π
D Roland Walker, <walker@pobox.com>. π«Ά
π COPYRIGHT and LICENSE π
This program is copyright (c) D Roland Walker 1999. π
This program is free and open software. You may use, modify, distribute, and sell this program (and any modified variants) in any way you wish, provided you do not restrict others from doing the same. that's the whole vibe. π
mwah π β this page was served fresh by perl v5.42.2, dated 2026-02-15, and filed under CMP(1). bye bestie! πΈ
π¦ where this page comes from
- alpine 3.24: perl-power-tools-doc 1.053-r1 Β· GPL-2.0-or-later AND Artistic-1.0-Perl AND Artistic-2.0 AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms