Coderwall

Topics by Tech

Ruby Python JavaScript Web Tools iOS PHP Android .NET Java

Software Categories

API gateway APM product comparisons Application security Certification platform Data integration Email gateway Subscription analytics

Quick Links

Recent Trending Popular Discover Topics Topic Categories Discover Software Categories
Jobs
Discover Topics Browse every programming topic Topic Categories Programming languages, frameworks and tools, grouped by categories
Recent Trending Popular

Topics by Tech

Ruby Python JavaScript Web Tools iOS PHP Android .NET Java
Discover Software Categories Browse every software category
API gateway APM product comparisons Application security Certification platform Data integration Email gateway Subscription analytics
Jobs
Sign In or Up
Last Updated: February 25, 2016
·
672
· mgamer

Find line with text + surrounding lines

#grep
#find
#linux
#mac
#lines
#egreg
#surrounding

egrep -A 5 "(error):"

#grep
#find
#linux
#mac
#lines
#egreg
#surrounding

Written by michał łukasiewicz

Say Thanks
Respond

Related protips

Recursive find & replace with sed

80.26K
2

Introduction to `ngrep`

56.71K
0

Grep and replace text in files

23.71K
0

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Best #Grep Authors
mattsenior
80.26K
#grep
#JavaScript
#Shell
haiqus
58.93K
#grep
#Go
#Ruby
rhumlover
23.71K
#grep
#Open Source
#Ruby
pgolm
21.85K
#grep
#Shell
#JavaScript
daraff
12.68K
#grep
#PHP
#Javascript
Related Tags
#grep
#find
#linux
#mac
#lines
#egreg
#surrounding
Sponsored by
#native_company#
#native_desc#
#native_cta#
Filed Under

Everyday tools of the trade
Linux tips from the metal up
Awesome Job
See All Jobs

Post a job for only $299
Thanks to our sponsor
Sponsored by #native_company# — Learn More
#native_title# #native_desc#
#native_cta#
@coderwall
APM product comparisons Application security Contact Privacy Terms

Copyright 2026

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.