Question: I'd like to print a single line directly following a line that contains a matching pattern.
My version of sed
will not take the following syntax (it bombs out on +1p
) which would seem like a simple solution:
sed -n '/ABC/,+1p' infile
I assume awk
would be better to do multiline processing, but I am not sure how to do it.