I have two files hello.txt
and hello.txt.md5
MD5 output is in the below format
cat hello.txt.md5
b1946ac92492d2347c6235b4d2611184
I wrote a simple script to validate md5sum.
csum=$(cat hello.txt.md5)
echo "$csum hello.txt" | md5sum -c
This script works fine with Ubuntu 13.10
but it throws below error in Ubuntu 12.04
.
md5sum: standard input: no properly formatted MD5 checksum lines found
Can anyone show me how to do this in Ubuntu12.04.
At least on my md5sum files generated have two spaces between checksum and file name. Tested your script and it didn't work, added space between $csum and hello.txt and it did.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With