Here, I am going to share a small shell utility which will ask source file name and the pattern which need to be searched in file and give the formatted output with the line no with line. You can select the no of lines which display before and after the string.
![](https://img823.imageshack.us/img823/4541/bloglogof.png)