grep -in
sed -n ',p' |more
Example:[root@HOSTNAME~]#grep -in error SystemOut.log
18993:[9/4/13 8:11:17:570 GST] 00000020 ServerCache E DYNA1082E: WebSphere error1
19170:[9/4/13 8:11:17:570 GST] 00000020 ServerCache E DYNA1082E: WebSphere error1
[root@HOSTNAME~]#
[root@HOSTNAME~]#
[root@HOSTNAME~]#sed -n '18993, 19000p' SystemOut.log|more
Note:The first command (grep)gives you the line numbers with patterns found in the file
In second command provide a start and end line number based on the output of the first command. ensure to put the letter "p" after the end line number.
You can either redirect it to a file using ">" redirective or through more command on the console.
Thanks
CB