need help in greping

Hi,

i have to find a string in a file and positin of the string in the file would come in some particular interval.

let's say file is 1-1000 lines and string is in from 200-300line.
could any one suggest me how to get make the grep search for the string in that particular portion of the file and leave the rest.

And the file is a log file, so it is constantly changes(no. of lines)

head -300 infile | tail -100 | grep "search text"

Or, if you know lines before and after the ones you are looking for, you could do something like:

cat file | awk '/start string/,/end string/' | grep "search text"

Or this:

awk 'NR > 200 && NR < 300 && /search text/' file.txt
sed -n "200,300{/string/p;}" file