Skip to content

Instantly share code, notes, and snippets.

@thomie
Created August 18, 2010 09:13
Show Gist options
  • Save thomie/534112 to your computer and use it in GitHub Desktop.
Save thomie/534112 to your computer and use it in GitHub Desktop.
Rename Green's functions
#!/bin/sh
FILES='
Makefile.am
*.hpp
*.cpp
*.py
test/Makefile.am
test/*.cpp
test/*.py
binding/Makefile.am
binding/*.hpp
binding/*.cpp'
REGEXP='
s/FirstPassageGreensFunction1DRad/GreensFunction1DRadAbs/g;
s/FirstPassageGreensFunction1D/GreensFunction1DAbsAbs/g;
s/BasicPairGreensFunction/GreensFunction3DRadInf/g;
s/FirstPassageGreensFunction/GreensFunction3DAbsSym/g;
s/FirstPassageNoCollisionPairGreensFunction/GreensFunction3DAbs/g;
s/FirstPassagePairGreensFunction/GreensFunction3DRadAbs/g;
s/FreeGreensFunction/GreensFunction3DSym/g;
s/FreePairGreensFunction/GreensFunction3D/g'
sed -i "$REGEXP" $FILES
rename "$REGEXP" $FILES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment