Print all the lines between 2 specified strings

Hi All,

I have a file in which i want to print all the lines between 2 defined strings. Ex- I have file with data as follows
STEP1:-
----- has some 20 -30 lines of data
STEP2:-
----- has some 20 -30 lines of data
So i want to print those lines between STEP1 & STEP2. (line including STEP1)

Thanks,
Raghava

awk '/STEP 1/,/STEP 2/' file

Thanks Ghostdog, but the output has the STEP 2 line which i dont want....

Hi Ghostdog
But if want to use same syntax bt here the value for STEP1 and STEP2 is not hard coded but if i want to pass these value through varialble thn how can i acheive this n how can i define the variable

any update......????

How to call the varaible value in '/STEP1/,/STEP2/'????

sed -n '/pat1/,/pat2/p' a.txt

Hi,
awk '/STEP 1/,/STEP 2/' file will return for all the occurances . if i want to get only 1st or second occuraces then what needs to be done....

prints only the first occurrence.

sed -e '/STEP1/ { :loop
n
/STEP2/!b loop
q
}' file_name