I'm working on a script and need to parse the hash from a file create by this command:
md5sum somefile >> md5_log
The reason I need to hash is the contents of md5_log does not identify the correct file...sorta.
i.e.
hashnumbers /dev/sda
where /dev/sda is the original file hashed.
I need to compare the hash to the file after it's been moved, thus /dev/sda is incorrect, so md5sum -c will not compare the correct file.
Any input on how I can do this? Parse to white space or copy the hash and replace /dev/sda?
I need a new log file for the comparison.
awk '{print $1}' md5log would seem to have promise if I could concatenate my variable that states the new file to the end of the awk output
finding some good info in here :
http://forums.fedoraforum.org/showthread.php?t=220435 but any input is always appreciated.