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
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