All,
I am looking for a one-liner to insert text into an ascii file above a line that matches a search.
Example.
I would like to insert a line of text above the line End_of_Section in a file.
Before:
file_a
-------
Start_of_Section
mike
julie
spencer
End_of_Section
After:
file_a
-------
Start_of_Section
mike
julie
spencer
dave
End_of_Section
I would prefer to do this with a one liner. Thanks in advance.
Mike
I am looking for a one-liner to insert text into an ascii file above a line that matches a search.
Example.
I would like to insert a line of text above the line End_of_Section in a file.
Before:
file_a
-------
Start_of_Section
mike
julie
spencer
End_of_Section
After:
file_a
-------
Start_of_Section
mike
julie
spencer
dave
End_of_Section
I would prefer to do this with a one liner. Thanks in advance.
Mike