gsub

pdirt/drv/bin/gsub · 219 B

From the archive pDirt-1_tar.gz

Download the archive   « Back to the archive contents

# 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 *.c *.h 
do
sed -e "s/$1/$2/g" $file > ${file}.temp
mv ${file}.temp $file
done

Site Stats

Snippets: 1791
Codebases: 571