how do I verify that the the checksum is correct?
Jacques B.
jjrboucher at gmail.com
Sat Feb 3 15:51:32 UTC 2007
> test [ "`sha1sum cd.iso`" = "`cat checksumfile.txt`" ] && echo
> "matches" || "echo "no match"
> where checksumfile.txt is the one provided by the web site.
Minor correction to the above. I booted to my FC partition and tested
it outside and within a script. The proper syntax is:
test "$(sha1sum cd.iso)" = "$(cat checksumfile.txt)" && echo "Matches"
|| echo "No match"
or
test "`sha1sum cd.iso`" = "`cat checksumfile.txt`" && echo "Matches"
|| echo "No match"
The difference being no square brackets []. Of the two syntaxes
above, I've been typically using the back ticks ` (above the tidle ~).
But in a BASH scripting book that I have the author uses $() instead
of ``.
If you have several iso files that youve downloaded along with their
checksum files, simply cat all the files into one
cat cd1chksum.txt cd2chksum.txt cd3chksum.txt etc... > checkthese.txt
and then run the command
sha1sum -c checkthese.txt
A quick and efficient way to check several checksum files.
Jacques B.
More information about the users
mailing list