Thursday, April 7, 2016

Simple sed-command for exchanging a string in multiple files

sed -i "s/oldstring/newstring/g" 

For example
sed -i "s/11204/12102/g" /etc/oratab

2 comments:

  1. there's a typo. must be sed instead of sid

    ReplyDelete
  2. Indeed. DBAs use the term "sid" all too much. Corrected now. Thanks for pointing it out.

    ReplyDelete