aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/rename-pattern
blob: 09916b831df1f1021e66cf97b6c5fda39c5307b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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