What I want to do is make three new files with just those selections. So the three lowercase lines under CORP-CRASHTEST-BU would output to another file, then CORP-TEST would also output the following three lowercase lines to another file. I have tried to use arrays, but if I have to provide numbers to identify the arrays it would be hard since it is not just the file above but other files that I want to perform this operation on. I need a a script that would send anything underneath a line that contains capital letters to another file. If anyone has a suggestion on how to start on this, it would be appreciated. I have not started on it yet, so I'm just asking for a general idea.
The difference is that Yoda's approach would fire a new file name if $0 contains one single upper case char anywhere, while the other needs an all upper $0. The specification is a bit vague in this point...