Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
pure bash find and replace
#!/bin/sh
for file in $(find DIRECTORY -name FILENAME)
do
sed -e "s/KEYWORD/REPLACEMENT/ig" $file > /tmp/tempfile.tmp
mv /tmp/tempfile.tmp $file
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment