summaryrefslogtreecommitdiff
path: root/bin
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
ng
Diffstat (limited to 'bin')
-rwxr-xr-xbin/grephdr.sh3
-rwxr-xr-xbin/grepsrc.sh3
-rwxr-xr-xbin/rename.sh6
3 files changed, 12 insertions, 0 deletions
diff --git a/bin/grephdr.sh b/bin/grephdr.sh
new file mode 100755
index 000000000..b0f979196
--- /dev/null
+++ b/bin/grephdr.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+# grepsrc.sh string --- greps for string over all java files
+find . -name "*.h" -print | grep -v "#" | xargs grep "$@"
diff --git a/bin/grepsrc.sh b/bin/grepsrc.sh
new file mode 100755
index 000000000..0c18dd7d2
--- /dev/null
+++ b/bin/grepsrc.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+# grepsrc.sh string --- greps for string over all C files
+find . -name "*.c" -print | grep -v "#" | xargs grep -n "$*"
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