How to print the number of lines from a file, the starting string should be passed`

Hi ,

I have file, which has the below content:

line 100
a
b
c
d
line300
a
s
d
f
s
line200
a
s
d
a

I want to display the content starts from line300 and i need to copy the 10 sequent lines.

One more requirement is to display the lines starting from line300 and upto the line200

Note:
I have tried a shell script with 'sed', but i couldn't get desiered output. please help me..

Thankyou all in Advance...

I want to display the content starts from line300 and i need to copy the 10 sequent lines.

awk '/line300/,/ / { print;}' awk_ip | head -10

One more requirement is to display the lines starting from line300 and upto the line200

 
awk '/line300/,/line200/  { print;}' file_name
awk -v n=10 '/300/{for(i=1;i<=n;i++){print;getline};exit}' file
sed -n '/line300/,/line200/{p}' file

cheers,
Devaraj Takhellambam

Your first request...

> cat file20
line 100
a
b
c
d
line300
a
s
d
f
s
line200
a
s
d
a

> tail +`cat -n file20 | grep "line300" | awk '{print $1}'` file20 | head -10
line300
a
s
d
f
s
line200
a
s
d

The previous solutions are NICER, but this uses some commands in unusual ways, so I thought it would be interesting (and educational) to see them used in this manner.
Explained:
I put a line number with each of your lines
grep for the requested text
determine its line number
start my display at that line number
and continue for ten lines