I have multiple email id’s in some config files in a directory; I’m running my scripts on a Solaris machine. I want to perform the following:
Find all the email_id’s in the config files in a directory:
eg: abcd@hotmail.com ; dfgh@hotmail.com ; mnop@hotmail.com ; fghk@hotmail.com
Replace all existing id’s with:
wxyz@hotmail.com
The following implementation can help me replace “hotmail” with “gmail” for all the email id’s in the config files. But i’m a little confused to solve the above problem
perl -pi -e 's/\@hotmail/\@gmail/g' *
Thanks in advance!
Try