I have a very basic question on deleting/printing from/to a file.
My input file is something like this:
A1:This is the first line
A2:Welcome to the first line
A3:haaaaaaaaaaaaaaaaaaaaa
A1:This is the first line
A2:Welcome to the second line
A3:heeeeeeeeeeeeeeeeeeeee
I want to first search for A2 and then look for "first" in the string. If i find it, i then want to remove the first set of A1,A2 and A3 lines from this file. Can somebody help me with this?
My input file is something like this:
A1:This is the first line
A2:Welcome to the first line
A3:haaaaaaaaaaaaaaaaaaaaa
A1:This is the first line
A2:Welcome to the second line
A3:heeeeeeeeeeeeeeeeeeeee
I want to first search for A2 and then look for "first" in the string. If i find it, i then want to remove the first set of A1,A2 and A3 lines from this file. Can somebody help me with this?