Consulting Services and Tech-Tips from Ben Patridge
sed -n '/pattern/{n;p;}' infile
File
# cat infile line 1 line 2 pattern line 3 line 4
Example
# sed -n '/pattern/{n;p;}' infile line 3
Your email address will not be published. Required fields are marked *
Comment *
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I comment.
Δ