Volker Kuhlmann wrote:
> I am trying to write shell scripts so they work on any distro. For that,
> --version and --help are irrelevant, use of "-" can be avoided. When
> creating a checksum for stdin, that md5sum correctly writes "-" as
> filename (probably as per RFC), but for checking the data from stdin,
> the checksum must be read from a file - and it promptly complains
>     md5sum: can't open -
> i.e. it can't find the file named "-". D'oh.

cat /etc/debian_version
3.1

[EMAIL PROTECTED]:~$ dpkg -S /usr/bin/md5sum
dpkg: /usr/bin/md5sum

[EMAIL PROTECTED]:~$ md5sum
blahblahblah[Ctrl+G]
8c3c1a60b5c10f3faacd15ae3b1db6fb  -


cat test.txt | md5sum
a40ed13005e08841d25cf5a6f3f11ca1  -

Seems like Sarge's md5sum reads from stdin just fine :P



Reply via email to