Remove all lines after a pattern match in shell using sed command
by rajesh[ Edit ] 2014-05-13 11:52:49
Using the following command will remove all the lines in file after a defined pattern match:
sed -e '/pattern/,$d'
filename replace pattern with your pattern and finame with your file name.