check md5sum from pipe
You do this:
cat file | md5sum > sumfile
And the next day you can do this:
cat file | md5sum --check sumfile
Which prints:
-: OK
if everything is alright.
I assume that you do know the md5sum of the file.
Just issue the following command:
echo ff19e3f8bde936457b8e53c825110987 myfile | md5sum --check - myfile: OK
md5sum --check
, like md5sum
with any other option (or none)
takes input from stdin if no file (or -
)
is specified on the command line.