# The following will replcae each line in the file Loc* begining with # 0 0 #with the line #%0 0 perl -pi -e 's/^ 0 0$/\%0 0/g' Loc*