Skip to content

Instantly share code, notes, and snippets.

@Artistan
Created November 15, 2013 21:50
Show Gist options
  • Save Artistan/7492255 to your computer and use it in GitHub Desktop.
Save Artistan/7492255 to your computer and use it in GitHub Desktop.
find and replace
f 'findthistext' | xargs sed -i -e 's/findthistext/replacewiththistext/g';
# replace members/upload.php with upload.php
f 'members\/upload\.php' | xargs sed -i -e 's/members\/upload\.php/upload\.php/g';
# using my .bash_profile
# prevents changes to .svn and .git files!!!
f 'findthistext' | xargs sed -i -e 's/findthistext/replacewiththistext/g';
# replace members/upload.php with upload.php
f 'members\/upload\.php' | xargs sed -i -e 's/members\/upload\.php/upload\.php/g';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment