I want to compare file1
with file2
.
file1
contains a set of pathnames and file2
contains a set of words.
If any pathname contains any of the words in the second file, it should be commented out by prepending the line with //
.
file1
:
xxx/AAA.tmp.v
xxx/BBB.tmp.v
xxx/CCC.tmp.v
file2
:
BBB
CCC
FFF
Desired output in a new file:
xxx/AAA.tmp.v
// xxx/BBB.tmp.v
// xxx/CCC.tmp.v
/data.
in file1? solution would be easier if that is the case... and it is better to add your efforts made and point out where you got stuck... – Sundeep Sep 26 '17 at 04:50