Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert line before occurence 1

Status
Not open for further replies.

TheDash

MIS
Mar 25, 2004
171
US
Hello,

I would like to insert a line with symbol / before every occurence of SELECT (line) in a file. Any idea how that can bee done? Thanks.
 
sed 's!SELECT!/SELECT!g' /path/to/input > output

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks I am already giving you points but can we also insert a line i.e. it will be a new line with / in it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top