Extract sections of a file using grep-like patterns. head+tail+grep on steriods.