Replace

Hi all experts,

I want to replace RORPELL_SYSTEM_REG_IND by this RORPELL_SYSTEM_REQ_IND. The script name is rorpelli_0713003.sql and it has thousands of RORPELL_SYSTEM_REQ_IND . How i can do the replacement. I did VI to rorpelli_0713003.sql and then press /.

-----Post Update-----

Please help

sed 's/RORPELL_SYSTEM_REG_IND/RORPELL_SYSTEM_REQ_IND/g' rorpelli_0713003.sql

in vi?
:%s/RORPELL_SYSTEM_REG_IND/RORPELL_SYSTEM_REQ_IND/g

Thanks for your code. How i could save it after i change it? Does esc wq apply for this command?

{ rm rorpelli_0713003.sql; sed 's/RORPELL_SYSTEM_REG_IND/RORPELL_SYSTEM_REQ_IND/g' > rorpelli_0713003.sql; } < rorpelli_0713003.sql

sed is a Stream-line EDitor (see what I did there?).

Anyways, you do not esc + :wq or anything like in vim. You would either do in place editing

sed -i 'something here' file

Or you perform the action on a file and write the changed file to another file.

sed 'something here' file1 > file2

Great man, you guys are genious. Thanks for your time and efforts.