I have two files:
file1:
Code:
matchexpression1
matchexpression2
matchexpression3
file2:
Code:
random text matchexpression1 random text
random text
random text
random text
random text matchexpression2 random text
random text
random text
random text
random text matchexpression3 random text
random text
random text
random text
I'd like to iterate through file1 line-by-line and delete all lines that match as well as the next X lines below it in file2. So, if I wanted to delete the matching line of each expression in file1 as well as the next _two_ lines I'd be left with a file3 that looks like:
Code:
random text
random text
random text
Does anyone know how to accomplish this? Thx.