KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Using this: grep -A1 -B1 "test_pattern" file will produce one line before and after the matched pattern in the file. Is there a way to display not lines but a specified number of characters? The lines in my file are pretty big so I am not interested in printing the entire line but rather only observe the match in context. Any suggestions on how to do this?
Tags (comma-separated)
Save Edits
Cancel