Dec/09
2
Easiest commandline search and replace that I know
No comments · Posted by admin in code, one-liners
perl -pi -e 's/$findstr/$replacestr/g' file1 [file2, file3...]
It does not get much better than that. You get the benefit of Perl’s superior regex engine (sed is nice but it just can’t compare), and oooooooo baby it’s fast! Perl was made to process text!
No comments yet.
Leave a Reply
<< convert vdi to vmdk (virtualbox hard disk conversion to vmware hard disk format)

