3 # $0 string1 string2 file1 .. filen
6 echo "Usage: `basename $0` [-f] <string1> <string2> <file1> .. <filen>"
8 echo "Replaces all occurrences of string1 by string2 in files."
9 echo "(replacement of sed -i on those systems that don't support it)"
20 if grep "$FROMSTRING" "$f" >/dev
/null
23 sed -e "s@$FROMSTRING@$TOSTRING@g" "${f}"_bak
> "$f"
26 # echo "String $FROMSTRING not present in $f"