Page 1 of 1

What is Replace Command .

Posted: Tue Mar 04, 2014 8:55 am
by SammieEG
Below is solution to replace Specific word.

Suppose we have to replace word "four " by "three".

root@root [~]# cat file
one two four
one two four
one two four
one two four
one two four

root@root [~]# replace four three -- file
file converted

root@root [~]# cat file
one two three
one two three
one two three
one two three
one two three

And the word four get replaced by three.

Thank you :)

Re: What is Replace Command .

Posted: Tue Jul 14, 2015 3:57 pm
by markjacks
Nice trick! This could be very useful setting up as cronjob so we would make corrections on files automatically.