Lightning flashed, thunder crashed and alex stan <[EMAIL PROTECTED]> whispered:
| Could anyone help me?
| How can i find a string in a file and then replace it with another string?
| Thanks a lot
Try:
perl -i.bak -pe 's/oldstring/newstring/g' filename
This will create a backup of the original file and a new file with the
changes.
-spp
--
Stephen P Potter [EMAIL PROTECTED]
"You can't just magically invoke Larry and expect that to prove your point.
Or prove that you have a point." -Simon Cozens
UNIX, Perl, PHP, Web Consulting and Training http://www.unixlabs.net/~spp/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]