Skip to content

Instantly share code, notes, and snippets.

@JoshuaEstes
Created December 13, 2011 17:29
Show Gist options
  • Save JoshuaEstes/1473035 to your computer and use it in GitHub Desktop.
Save JoshuaEstes/1473035 to your computer and use it in GitHub Desktop.
command line function to search and replace text
perl -p -i -e 's/oldstring/newstring/g' `find ./ -name "*.html"`
for f in $(ack-grep -l "head\.ready"); do sed -i -e "s/head\.ready/\$(document).ready/g" $f; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment