Results 1 to 3 of 3
Hi all,
I have a set of lines as ahown below:
Leon went to school
Leon came back from school..
Leon had dinner...
I have to replace the line containing ...
- 10-16-2010 #1Just Joined!
- Join Date
- Oct 2010
- Posts
- 3
[SOLVED] Using sed Replace line containing particular string by a single string
Hi all,
I have a set of lines as ahown below:
Leon went to school
Leon came back from school..
Leon had dinner...
I have to replace the line containing "dinner" by a single string LUNCH...
can anyone hint me how to do using sed command....
- 10-19-2010 #2Just Joined!
- Join Date
- Oct 2010
- Posts
- 5
Replace line using sed
Code:echo "Leon went to school Leon came back from school.. Leon had dinner..." | sed '/dinner/ c\LUNCH'
- 10-19-2010 #3Just Joined!
- Join Date
- Oct 2010
- Posts
- 3
great..... it worked.... thank u


