remove range part of a file with sed

Hello,

I would like to remove a range from a file with sed or any script command that is appropriate

The section start by [b]and finish by [C] and I would like to keep [C] line

Could you tell me which command I should type ?

Thanks a lot,

Franck

My input file is like this

[A]
aaa

[b]bbb
[C]
ccc

And I would like to have in my output file
[A]
aaa
[C]
ccc

With awk:

awk 'p && /\[/{p=0} //{p=1} !p' file

Use nawk or /usr/xpg4/bin/awk on Solaris if you get errors.

Regards