HF RL Explorer

Task: Display Characters Before and After a grep Match

Task: Display Characters Before and After a grep Match: a task in Terminal-Lego-15k (Harbor dataset). When using grep -A1 -B1 "pattern" file , you get one line before and after the matched pattern. However, when dealing with files that have very long lines, you may want to display only a specific…

The task

When using `grep -A1 -B1 "pattern" file`, you get one line before and after the matched pattern. However, when dealing with files that have very long lines, you may want to display only a specific number of **characters** before and after the match, rather than entire lines.

Part of PrimeIntellect/Terminal-Lego-15k.