Bash How To Print Lines After A Matching Line

[Solved] Bash How To Print Lines After A Matching Line | Basic - Code Explorer | yomemimo.com
Question : bash how to print lines after a matching line

Answered by : charlesalexandre-roy

# Basic syntax:
grep -A number word_to_match input_file
# This prints "number" number of lines after and including the first
# line that matches word_to_match in the input_file
# Note, the word_to_match can be any expression that grep uses for
#	identifying matches (e.g. including combinations of AND and OR, etc) 

Source : https://www.theunixschool.com/2012/05/different-ways-to-print-next-few-lines.html | Last Update : Sat, 10 Oct 20

Answers related to bash how to print lines after a matching line

Code Explorer Popular Question For Basic