My idea: read the first file, build a regex from all lines (by joining the lines with |), then read the second file, and prepend a # to all lines which match the regex.
(It's easier if you first produce the correct output instead of editing the file in-place).
In reply to Re: how to comment the lines if found a match
by moritz
in thread how to comment the lines if found a match
by kavitha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |