Aug 8, 2008 #1 TheDash MIS Joined Mar 25, 2004 Messages 171 Location 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.
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.
Aug 8, 2008 1 #2 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR sed 's!SELECT!/SELECT!g' /path/to/input > output Hope This Helps, PH. FAQ219-2884 FAQ181-2886 Upvote 0 Downvote
Aug 8, 2008 Thread starter #3 TheDash MIS Joined Mar 25, 2004 Messages 171 Location US 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. Upvote 0 Downvote
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.
Aug 8, 2008 #4 Annihilannic MIS Joined Jun 22, 2000 Messages 6,317 Location AU Code: sed '/SELECT/i\ /' /path/to/input > output Annihilannic. Upvote 0 Downvote