in reply to Print 5 lines before and after pattern match from a list

not Perl, but also at 'nix shell -- grep/egrep paramaters -A (after) and -B (before).
alpha bravo charlie delta echo foxtrot
# egrep -B 1 'charlie|foxtrot' t bravo charlie -- echo foxtrot