Display a block of text with delineated by a start pattern and an end pattern

Taken idea from commandlinefu.com

The command will display a segment from the file from the start pattern to the end pattern.

function viewsegment() { tail -n +`fgrep -n -m 1 "$1" $3 | head -`fgrep -n -m 1 "$2" $3 }
Display a block of text with delineated by a start pattern and an end pattern

About Amit Agarwal