Pattern matching

I have a file containing records;

FTEFDF CC cdscsf
GDGBFCS RR cscscs
ASCCDDF WW jkkkuykhm
NKN SS sdcscscsv

My problem is to search through the entire document and extract the pair of records that contain RR and WW in the consecutive records at the second field position. The fields are separated by a space. Plz help!!

Regards;
BB.

awk '$2 == "RR", $2 == "WW"' file

Not working.

Regards,
BB

Works here. Do you get an error message? Do you have nawk / mawk / gawk that you could try instead of plain old awk? Try this, too (assuming there are always three fields, or that false matches are otherwise unlikely).

sed '/ RR /,/ WW /!d' file