grep from file

hi all

I am using below mention file as input file. Now i want to grep only contain between BSCANGR( op mention below). line containg between BSCANGR may be vary its not fix.

Kindly suggest me.

*** BSCANGR
RXOTRX-280-1 INTERNAL
RXOTRX-48-2 MODE
RXOTRX-48-3 MODE
RXOTRX-194-11 MODE
RXOTRX-194-10 MODE
RXOTRX-147-0 INTERNAL
*** BSCANGR
*** BSCSLP2
RXOTRX-20-1 INTERNAL
RXOTRX-4-2 MODE
RXOTRX-4-3 MODE
RXOTRX-14-11 MODE
RXOTRX-14-10 MODE
RXOTRX-17-0 INTERNAL
*** BSCSLP2

op need to like this:

*** BSCANGR
RXOTRX-280-1
RXOTRX-48-2
RXOTRX-48-3
RXOTRX-194-11
RXOTRX-194-10
RXOTRX-147-0
*** BSCANGR

also i am thank full if some one suggest for below mention op.from same file.

@ CONNECT('BSCANGR')
RXCDP:RXOTRX-280-1;
RXCDP:RXOTRX-48-2
RXCDP:RXOTRX-48-3
RXCDP:RXOTRX-194-11
RXCDP:RXOTRX-147-0
@ DISCONNECT

You can use 'sed' to extract the section of the file that you want like so:

sed -n '/BSCANGR/,/BSCANGR/p' file.txt

Hope this helps.

plz also suggest for below mention op if possible.

@ CONNECT('BSCANGR')
RXCDP:RXOTRX-280-1;
RXCDP:RXOTRX-48-2
RXCDP:RXOTRX-48-3
RXCDP:RXOTRX-194-11
RXCDP:RXOTRX-147-0
@ DISCONNECT