Grep with context

Terminal
grep -C 3 "pattern" <file>