11 Oct 2021 14:29:07 UTC
- Distribution: PerlPowerTools
- Source (raw)
- Browse (raw)
- How to Contribute
- Repository (git clone)
- Testers (148 / 0 / 0)
- KwaliteeBus factor: 1
- 85.29% Coverage
- License: perl_5
- Perl: v5.8.0
- Activity24 month
- Download (339.52KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
cmp - compare two files
cmp [-l] [-s] file1 file2 [skip1 [skip2]]
cmp compares two files, byte-by-byte. The result of the comparison is always given by the exit status, and may be summarized on the standard output according to the options given on the command line.
If the two compared files are identical, cmp will exit with a zero exit status. If the compared files are not identical, cmp will exit with a status of 1.
If no options are given, cmp will return (on the 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 the standard error indicating that EOF was reached in the shorter of the two file.
skip1 and skip2 are optional byte offsets into file1 and file2, respectively, that determine where the file comparison will begin. Offsets may be given in decimal, octal, or hexadecimal form. Indicate octal notation with a leading '0', and hexadecimal notation with a leading '0x'.
silent execution; indicate results only by exit status, suppressing all output and warnings.
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.
show the documentation
show a short usage summary
No environment variables affect the execution of cmp.
No known bugs.
D Roland Walker <email@example.com>.
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.
Module Install Instructions
To install PerlPowerTools, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install PerlPowerTools
For more information on module installation, please visit the detailed CPAN module installation guide.