Skip to content

Instantly share code, notes, and snippets.

@basilio
Created July 6, 2013 17:53
Show Gist options
  • Save basilio/5940668 to your computer and use it in GitHub Desktop.
Save basilio/5940668 to your computer and use it in GitHub Desktop.
multiple file replaces using sed
# Make global replaces in multiples sql files, using sed
# Tested on Mac OSX
for x in *.sql; do sed -i '' 's/currentText/newText/g' ${x//.sql}.sql; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment