mars/rename.sh
Thomas Schoebel-Theuer 24e936086a import mars-24.tgz
2013-01-08 15:53:54 +01:00

15 lines
244 B
Bash
Executable File

#!/bin/bash
old=backup.$$
files="*.h *.c"
#files="mars_buf.h mars_buf.c"
mkdir -p $old || exit $?
cp -a $files $old || exit $?
for i in $files; do
sed "$1" < $i > $i.tmp || exit $?
cmp $i $i.tmp || mv $i.tmp $i
rm -f $i.tmp
done