Cut rows

Hi,

I have a requirement to search for two words and grep all the lines between them. For e.g. :

$cat file.dat
abc,To,number
acd,To,cnz \* flexibile select *\
bcd,To,lla
anz,From,kln
app,From,lpz

I need to get all the lines between the lines cantaining word 'acd' and 'anz'.

the final result should be :

acd,To,cnz \* flexibile select *\
bcd,To,lla
anz,From,kln

Thanks in advance.

sed -n '/acd/,/anz/ p' file.dat

Cheers
ZB

Thanks, Bob. It is worked fine.