Is there any alternative to grep’s -A -B -C switches (to print few lines before and after )?
grep -A 2 -B 3 prints 2 lines after the grep string and prints 3 lines before. grep -C 3 prints 3 Lines before and 3 lines after Unfortunately, the grep I’m using does not support these options. Are there any alternative commands or script available to simulate this? Using sed/awk/perl/shell scripts? Answers: Thank you … Read more