Doing host1
Doing host2
Doing host3
host3:grep
Doing host4
host4:grep
Doing host5
Doing host6
host6:grep
The file is similar to the above and I know how to match say "Doing" and print the next line, but am unsure how to match "Doing" and print that line if the next line is also "Doing" and doesn't have "grep".
Example:
Doing host1
Doing host2
Doing host5
Doing host2
Doing host3
host3:grep
Doing host4
host4:grep
Doing host5
Doing host6
host6:grep
The file is similar to the above and I know how to match say "Doing" and print the next line, but am unsure how to match "Doing" and print that line if the next line is also "Doing" and doesn't have "grep".
Example:
Doing host1
Doing host2
Doing host5