Assume I have a text file blah.dat. In that file there can be a line (or multiple lines)
among other lines containing the text fragment pattern "version" (without quotes).
Other characters can appear in these lines as well.
Now I want to replace ALL lines in this file with the text line "vers. release"
(without quotes). All other lines should remain untouched.
Order of lines should remain as well.
Example blah.dat:
kikik ikik ik kik kik
hello version endofline
rtrtrtrtrtrtrt trtrtr
afterwards:
kikik ikik ik kik kik
vers. release
rtrtrtrtrtrtrt trtrtr
I guess that this can be done most comfortable with the sed.
How do I do that ?
Thx
Matt