I try to replace matched-words (not patterm)in a file by using SED command. Does someone can give some sample how to do it? Or make correction what I did below. Thanks. Mike
RULE_FILE contains: s/com/commsup/g
s/abc/xyz123/g
..........
TARGET_FILE might contains: abcdefg computor 'abc' # not replace.
abc.com com; &abc /com "abc" abc, .. # need to be replaced.
The command I used:
Unix prompt$> sed -f RULE_FILE/TARGET_FILE > NEWFILE
RULE_FILE contains: s/com/commsup/g
s/abc/xyz123/g
..........
TARGET_FILE might contains: abcdefg computor 'abc' # not replace.
abc.com com; &abc /com "abc" abc, .. # need to be replaced.
The command I used:
Unix prompt$> sed -f RULE_FILE/TARGET_FILE > NEWFILE