summaryrefslogtreecommitdiff
path: root/bin/rename.sh
blob: 7d5790b41986ae43eefcc8d25ceb604f4a448b79 (plain)
1
2
3
4
5
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