gsub
mud++0.33/src/gsub · 232 B
From the archive mud++0.33.tar.gz
Download the archive « Back to the archive contents
# !/bin/sh
# Do global replacement of string in all source code files.
# I use this all the time, but I advise you to be careful
# -Fusion
for file in *.cpp *.h
do
sed -e "s/$1/$2/g" $file > ${file}.temp
mv ${file}.temp $file
done