I want to find a pattern. Then I want to compare string 4 of the line with the pattern in it to string 4 of the line above it. If those 2 strings match, I want to delete both lines.
I know this will delete line with pattern and line above but I don't know how to add the step of matching up string 4.
awk ‘ /UNDO/{x=””;next}
{if(x)print x;x=$0}
END{if(x)print x} ‘ FILE
I know this will delete line with pattern and line above but I don't know how to add the step of matching up string 4.
awk ‘ /UNDO/{x=””;next}
{if(x)print x;x=$0}
END{if(x)print x} ‘ FILE