#!/bin/sh
# Changes a string in all selected files.
# Limit to certain files by defining a selective "find"
#
# Example:
#    cd /path/to/files
#    find . -name '*.tcl' -exec sh ./change-link {} \;
#
# After modifications, delete all .tmp2 files:
#
#    find . -name '*.tmp2' -exec  rm {} \;
#
echo "change_link: processing $1 ..."
mv $1 $1.tmp2
touch $1
sed -e '1,$s/Gm::errmsg/GmLib::errmsg/g' $1.tmp2 >> $1

