Possible workaround then:

echo bla | md5sum > checksum-1.md5
echo bla | md5sum > checksum-2.md5
diff checksum-1.md5 checksum-2.md5
if [ $? -neq 0 ]; then
  echo "Checksum mismatch"
fi

Volker Kuhlmann wrote on 07/12/06 10:11:
> On Thu 07 Dec 2006 09:10:29 NZDT +1300, Joseph Miller wrote:
> 
>> cat test.txt | md5sum
>> a40ed13005e08841d25cf5a6f3f11ca1  -
>>
>> Seems like Sarge's md5sum reads from stdin just fine :P
> 
> Seems like you too missed the point of reading the data from stdin for
> *CHECKING*, not *CHECKSUM GENERATION*... ;)
> 
> The test case is this:
> 
> echo bla | md5sum >checksum.md5
> echo bla | md5sum -c checksum.md5
> 
> Volker
> 

Reply via email to