Skip to content

Instantly share code, notes, and snippets.

@shillcock
Created October 30, 2008 20:35
Show Gist options
  • Select an option

  • Save shillcock/21133 to your computer and use it in GitHub Desktop.

Select an option

Save shillcock/21133 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Find and replace shell script
find . \( -name '*.cpp' -o -name '*.h' \) | xargs sed -i -e s/$1/$2/g
find . -name \*-e | xargs rm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment