Sample Header Ad - 728x90

Comment from start of file to a pattern matched line using sed

5 votes
2 answers
231 views
I search a pattern, say 'START OF ARAMBOL' and it is matched in a file. Now I would like to comment every line from the line no 1 to the current matched pattern line no. I have to do it for more than 200 files. I can do this using perl too but is there any good sed method to do so. Thanks
Asked by Ramneek Singh Kakkar (187 rep)
May 17, 2019, 10:29 AM
Last activity: May 17, 2019, 03:34 PM