2
votes
1answer
967 views

List top/bottom ten lines of a word matching in a file

How do I list top or bottom 10 lines from the line that matched the word 'error' in a file. I'm using grep 'error' /var/log/logfile.log > errors to print and save the lines that matched the word ...