Thank you :) I'm glad it's useful to someone, it makes one feel that it's been worth the effort. It's tough to do string processing in a language that does not support it except through external utilities.
I'm planning on adding complete error checking since I've realized it's just the length parameter and the length of the character set which need checking, plus the total number of parameters. Not much overhead involved.
Of course writing this script wouldn't have been possible without looking at Pete S.' one in the first place, so big thanks to him too for the inspiration and ideas!
BTW, while checking the
Xen demo CD I was able to try the script also under Netbsd using both ksh and sh. Everything worked fine. This flavour happens to have OpenSSL but md5sum/sha1sum are called simply md5 and sha1; furthermore it has md4 and rmd160 as separate command-line programs.
I'll try to visit the IRC chan.
Cheers,
-- Pedro Gimeno
PS. Of course that comment about deleting 'm=16^{#hash};' would be me forgetting to write my name, sorry...