Fortune for fcmp's current commit: Half blessing − 半吉
|3 weeks ago|
|fcmprs||8 months ago|
|include||3 weeks ago|
|profile||8 months ago|
|src||3 weeks ago|
|.gitignore||8 months ago|
|LICENSE||8 months ago|
|Makefile||8 months ago|
|README.md||8 months ago|
A small shell util that compares files for identity with
fcmp produces no output, but success is indicated by its return code.
$ fcmp file1 file2 && echo "Equal!"
You can pass any number of files, but at least 2 must be provided.
|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|
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
To build normally, run
Build with default optimisations using
make release, it will output a stripped binary at
RELEASE_LDFLAGSto apply optimisations (and
DEBUG_LDFLAGSfor extra compiler flags with the debug target). If needed you can set these yourself to prevent the defaults.
-march=nativewhich may be undesireable for you. Set the variable or modify the Makefile if you need to remove this.
Building with Profile Guided Optimisation is supported with the
pgo Makefile target. It uses the same rules as the
release target and outputs a binary to
There may be small performance improvements from using this target instead of
release, but the difference is mostly negligable.
Build with debugging information and no optimisations using
make debug, it will output a binary at
OPT_FLAGSvariable. Override this variable if using another compiler that doesn't support these optimisations.
libpthread, to build a single-threaded version override the variables
FEAT_CFLAGS="-D_RUN_THREADED=1"to force the use of a parallelised run every time in the binary, although this is not recommended.
GPL'd with <3