Sed to read the file and replace and insert the pattern
Hi ,
I want to read from the file and check for the pattern, if the line has some word like <string>: then string should be copied into buffer. Afterwards, I want to insert the same <string> with some word in the next line of the file. Could you please help me out to use sed command to perform the above mentioned operations? Thanks, Saurabh |
I think you'd better use awk
|
Moin,
do you mean this? Code:
jan@jack:~/tmp> echo 'some text without the pattern |
All times are GMT -5. The time now is 07:50 PM. |