Fedora Linux Support Community & Resources Center
Prev Previous Post   Next Post Next
  #1  
Old 29th April 2009, 04:06 AM
michael12345 Offline
Registered User
 
Join Date: Nov 2008
Posts: 186
parse md5 in bash

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.

Last edited by michael12345; 29th April 2009 at 04:43 AM.
Reply With Quote
 

Tags
bash, md5, parse

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
parse a log file Wiles Programming & Packaging 1 31st August 2007 04:42 AM
Apache parse some php and not all amaj1407 Servers & Networking 3 6th July 2007 12:18 PM
How to parse a log file Goooofy Using Fedora 1 27th September 2005 06:36 PM


Current GMT-time: 18:21 (Monday, 20-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat