Thursday, July 9, 2015

Bash shell to find and replace text in multiple files

The snippet below will find and replace the string 'original string' with 'new string' in all the csv file inside /example/myfolder/

find /example/folder -name \*.csv -exec sed -i "s/original string/new string/g" {} \;

Pretty cool!