I am working a ruby code to append lines to a existing file at some
specified location. I do that by finding a particular string and append
the line below that. In a certain case i am trying to add a particular
line say welcome before a existing line,
I will need to add the line above line 4 as i cant append it after ) as
there may be several )'s. What is the way that i can do this?
It would be of great help. Thanks in advance.