Skip to main content

Extract a portion of log file...

# Based on line number :

sed -n 'startlineNumber,endlineNumber p' inputfile


# Based on a pattern which can be timestamp as well :


sed  -n '/start-pattern/,/end-pattern/p' inputfile > extracted_file

Comments