-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Alfred M. Szmidt on 4/9/2007 6:17 AM: > > I don't see any major problem why something like `hashsum > > ALGORITHM' wouldn't work though, `md5sum' could be the same as > > `hashsum md5'. And then md5sum could be a shell script, or just > > a simple program that calls `hashsum md5'. > > Except that since the *sum utilities operate on arbitrary files, > you would need it to be `hashsum --md5', ie. make the algorithm an > option rather than the first argument. > > Why not just: hashsum ALGORITHM [FILE]? A optional hashing algorithm > seems pointless for this.
Because on decoding, 'hashsum -c FILE' could be made smart enough to auto-detect the algorithm based on the length of the hash, but only if the algorithm is optional (--md5) rather than required (md5). Currently, md5, sha1, sha224, sha256, sha384, and sha512 all produce different hash lengths, making this task unambiguous (but I'm not sure how long md4 is). At any rate, since cksum is specified by POSIX, and since sum has a different output format, it is much harder to combine those two into a proposed hashsum than it is to join md5 and sha* sums. And as long as the complaint is about the number of separately named utilities, note that this page http://www.mkssoftware.com/docs/man1/dgstsum.1.asp also lists dgstsum, md2sum, mdc2sum, shasum, and ripemd160sum as separate utilities. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGGjF184KuGfSFAYARAvLeAJ4tv3Rl+tS8faZLL3OVRopctBQWcQCfc4vh lX2NvDuS/HS6sM7BqL1Qhbs= =wmyl -----END PGP SIGNATURE----- _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils