sed-search-and-replace-files

Switchin between patterns:

maybe you want to migrate a product installation from one name to other:

in this case the /opt/redha product is being switched to /opt\/oracle directory, and doing:

[formsuser@formshost ~]$  for i in $(grep -ilr /opt/redhat bea) ; do sed 's/\/opt\/redhat/\/opt\/oracle/g' $i > $i.OK ; done

You will eliminate all the files referral: