Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Find and replace MD5 hash from file

by adroc (Initiate)
on Jun 29, 2011 at 20:18 UTC ( [id://912027]=note: print w/replies, xml ) Need Help??


in reply to Re: Find and replace MD5 hash from file
in thread Find and replace MD5 hash from file

Thanks for the help, your solution works great but I forgot to mention that the file contains more then just the hashes.

For example user:$1$7FWHShP3$QzHTcsaII5leWMSv6weND7vSS1KMvcsjfYpiDZxc.TCAVR6XUdLaLtUBVTTwPFXZBKs52DRzW1UKFZ5JB27yI0:15152:0:99999:7:::

What needs to be modified in order for something like the above to work?

Thanks again

  • Comment on Re^2: Find and replace MD5 hash from file

Replies are listed 'Best First'.
Re^3: Find and replace MD5 hash from file
by ikegami (Patriarch) on Jun 29, 2011 at 20:28 UTC

    I switched from «s/.../.../» to «s/^...$/.../» to avoid possibly matching the wrong things. I incorrectly guessed your file format. You could revert to using «s/.../.../», or you could use the more restrictive «s/:...:/:...:/».

      Thx you very much

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://912027]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-18 22:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found