Print 3 lines of context around, before, or after each match

bzgrep

bzgrep --{{context|before-context|after-context}}={{3}} "{{search_pattern}}" {{path/to/file}}

click the source code to copy install bzgrep on any operating system with command-not-found.com