Sed question

Afternoon All,

Its been a long day, and I need help with the following:

Trying to cut and process sections of text from a long file based on line numbers. I need the equivalent of:

sed -n '1,10p'
or...
sed '1,10!d'
But, with two shell variables as line numbers. I've tried:

sed '$START,$END!d'
sed '${START},${END}!d'

No avail.

Any thoughts?

Simon

sed -n $a,$b'p' file

Thanks for the speedy response. Works a treat.

Just to add a little something,

I believe you can use double quotes as well...

sed -n "$a,$b p" file