Unix One Liner to Search and Replace a String in Multiple Files

By Ravi Karamsetty | January 13, 2015 |

Below is the unix oneliner to search and replace string in all files with extension .txt: perl -pi -e “s/<search string >/<replace string >/g” *.txt Example to search and replace string – “Cold” with “Hot” in all files with extension .txt: perl -pi -e “s/Cold/Hot/g” *.txt

Read More