gsub
mud++/bin/gsub · 231 B
From the archive mud++0.1.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 *.cc *.h
do
sed -e "s/$1/$2/g" $file > ${file}.temp
mv ${file}.temp $file
done