Quickly compare files for identity
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Go to file
Avril 74ebc7e74c
added readme
4 years ago
include initial commit 4 years ago
src working release 4 years ago
.gitignore working release 4 years ago
Makefile working release 4 years ago
README.md added readme 4 years ago

README.md

fcmp - compare file identity

A shell utils that compares files for identity with mmap() and memcmp().

Usage

fcmp produces no output, but success is indicated by its return code.

$ fcmp file1 file2 && echo "Equal!"
Code Meaning
0 The files are equal
1 The files are unequal
2 The files have unequal lengths, and therefor must be unequal
-1 There was an error

Therefor you can use this in shell scripts easily:

# Example

if fcmp "$1" "$2"; then
    echo "Files are equal!"
else
    echo "Files are not equal!"
fi

License

GPL'd with <3