On Fri, Sep 28, 2001 at 06:21:50PM -0700, Seth Cohn wrote: > > > Okay, so how does one do this? > > > > > > > $ cat <file> |md5sum > > Oh god no. Even easier: > > md5sum <file> [<file2> <etc>] > > so md5sum * will md5sum all of the files > and return a list to you. > It's extra work (for the machine), but easier to use in scripts that need to work cross-platform.
bash@debian$ md5sum test 37fa43f297878888a4c80842fed276e0 test bash@debian$ cat test |md5sum 37fa43f297878888a4c80842fed276e0 zsh@OpenBSD% md5 test MD5 (test) = 37fa43f297878888a4c80842fed276e0 zsh@OpenBSD% cat test |md5 37fa43f297878888a4c80842fed276e0 I can test for md5 or md5sum executable and use either as $md5_getter in lines like $md5=`cat $file |$md5_getter` to set $md5 to just the checksum, with no extra garbage. Of course, the scripts aren't for ISO image verification :P -- <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
