aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
Diffstat (limited to 'FICS')
-rwxr-xr-xFICS/rename-pattern22
1 files changed, 22 insertions, 0 deletions
diff --git a/FICS/rename-pattern b/FICS/rename-pattern
new file mode 100755
index 0000000..09916b8
--- /dev/null
+++ b/FICS/rename-pattern
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+TARGETS="
+*.c
+*.cpp
+*.h
+*.hpp
+"
+
+if test $# != 2; then
+ echo "error: bogus number of arguments"
+ exit 1
+fi
+
+if test -z "$1"; then
+ echo "error: first argument is of zero length"
+ exit 1
+fi
+
+for target in $TARGETS; do
+ sed -i "s/$1/$2/g" "$target"
+done