Coderwall
Ruby Python JavaScript Front-End Tools iOS
More Tips
Ruby Python JavaScript Front-End Tools iOS PHP Android .NET Java Jobs
Jobs
Sign In or Up
Last Updated: February 25, 2016
·
474
· 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

79.28K
2

Introduction to `ngrep`

54.26K
0

Grep and replace text in files

23.09K
0

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Best #Grep Authors
mattsenior
79.17K
#grep
#JavaScript
#Shell
haiqus
55.06K
#grep
#Go
#Ruby
rhumlover
23.04K
#grep
#Open Source
#Ruby
pgolm
20.14K
#grep
#Shell
#JavaScript
daraff
12.09K
#grep
#PHP
#Javascript
Related Tags
#grep
#find
#linux
#mac
#lines
#egreg
#surrounding
Sponsored by
#native_company#
#native_desc#
#native_cta#
Filed Under

Tools
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 Contact Privacy Terms

Copyright 2025

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