I have a bunch of files, which I would like to use # to comment the 1st non-blank line, the files are not in good format, so there may be 1 or multiple blank lines before the line I want to comment. Any way I can do it? thanks!
As an example:
File1:
<blank Line>
this is line 1, and I want to comment.
This is line 2...
File2:
<blank line>
<blank line>
This is line 1, and I want to comment.
This is line 2...
Hope I have state the questions clearly. :)