![[jump to content]](_.gif)
The tools are developed under Linux with
ESR's paradigm
release early, release often
in mind.
So you can consider this beta software, or alpha, or pre-alpha, or even worse ;)
Have a look in the download directory for all downloads.
As always here, all you get is the source. No binaries here.
Create md5sums for easy shell usage (look into latest version, download latest version 0.5.0-20081102-031402, sig)
Sometimes you want to pipe a list of files to md5sum. This then looks like
find . -type f -print0 | xargs --null md5sum -b -- | while read a b do ...
The problem is that the $b then starts with a * and you don't know what happens if the filename contains nonstarndard characters like LF. Some md5sum dialects just create garbage, others escape the MD5 sum.
md5chk doesn't do this and was designed from ground up for bash usage. It guarantees that the md5 sum always is "clean" and the filename always is properly escaped for shell reads. Note that there is no way for shell reads to express the newline character nor spaces at the end of an argument. So an unescape via ANSI strings must be done, sorry.
find . -type f -print0 | md5chk -n | while read -r md5 name do eval name="\$'$name'" ...
Note that the "eval" line does the escape entirely runs in the shell and thus is very fast.
Another common usage is "create md5 string from a file":
md5="`md5chk -iq "$name"`"; echo $?
Now you can create an md5sum from argument directly, too:
md5="`md5chk -dq "$string"`"
version 0.5.0-20081102-031402 | Added option -p (and --shit) Option -p initalizes the MD5 algorithm with some arbitrary string. This is to modify the md5 algorithm, to change calculated values. For example 'md5chk -p a -d b c' gives the same as 'md5chk -d ab ac', but the prefix is not shown in the output. The new integration option --shit is prepared, but not yet operational. (Sorry for the name, but I needed a silly option name which will not interfere with another option which already is in use.) Before you ask: SHIT will provide a built in co-processing method like shell pipes. However it will skip many fork() calls which are very slow platforms like CygWin. It also will work over network sockets. |
version 0.4.1-20080528-015214 | Bugfix, DEL now is an escaped character, too. Options in help output sorted, too |
version 0.4.0-20080207-025526(210153 bytes archive) | Minor bug removed and option -z added char can be unsigned on some platforms. However I doubt this code will it ever make to such platforms ever ;) Option z is to write NUL terminated lines (companion to reading NUL terminated lines). |
version 0.3.0-20070117-021932(142101 bytes archive) | Added options -d and -s -d is to directly create MD5 sums from strings given as arguments. If no arguments are present, lines are read from stdin. -s enables '-' as file argument, too. If no argument is given, the MD5 sum of the data read from stdin is printed. |
version 0.2.0-20060801-023724(152662 bytes archive) | Corrected version. Previous versions printed 1 byte too few HEX output, sigh. DO NOT USE PREVIOUS VERSIONS! This has been tested to work now: ./md5chk md5chk | sed 's/ / */' | md5sum --check |
| [view more history] | [view complete history] |
License and Disclaimer
All you can see here is free software according to the GNU GPL. |
|