1. To search a string from the content of files.
E.g. Search 'logo.gif' from all jsp,html and xsl files under current folder
2. To get lines in a certain range from file which is huge
E.g. Get the lines from 20 to 2000 from stdout.txt
E.g. Search 'logo.gif' from all jsp,html and xsl files under current folder
find . \( -name '*.jsp' -o -name '*.html' -o -name '*.xsl' \) -exec grep -l logo.gif {} \;
2. To get lines in a certain range from file which is huge
E.g. Get the lines from 20 to 2000 from stdout.txt
sed -n '20,2000p' stdout.txt > test.txt