summaryrefslogtreecommitdiff
path: root/bin/rename.sh
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2009-05-29 00:46:26 +0000
committerChristian Grothoff <christian@grothoff.org>2009-05-29 00:46:26 +0000
commit0a217a8df1657b4334b55b0e4a6c7837a8dbcfd9 (patch)
tree6b552f40eb089db96409a312a98d9b12bd669102 /bin/rename.sh
ng
Diffstat (limited to 'bin/rename.sh')
-rwxr-xr-xbin/rename.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/rename.sh b/bin/rename.sh
new file mode 100755
index 000000000..7d5790b41
--- /dev/null
+++ b/bin/rename.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+for n in `find * -name "*.c"` `find * -name "*.h"`
+do
+ cat $n | sed -e "s/$1/$2/g" > $n.new
+ mv $n.new $n || echo "Move failed: $n.new to $n"
+done