Help with Shell Script to identify lines in file1 and write them to file2

Hi,
I am running my pipeline and capturing all stout from multiple programs to a .txt file. I want to go into that .txt file and search for specific lines, and finally print those lines in a second .txt file.

I can do this using grep, awk, or sed for each line, but have not been able to get multiple lines together.
For example,

sed -n 3p stout.txt > out.txt 

---OR---

awk '/Processed reads/' stout.txt > out.txt

I would like to use a bash script to loop through the the input stout.txt, capturing several of the lines, then repeating until it reached the end of stout.txt, and printing to out.txt

The input file (here stdout.txt) is screen output from different programs mixed in with my echo commands.
For example:

##############
**testing** /illumina/runs/Runs/140513_H207_0249_AD2B9LACXX/
/illumina/runs/Runs/140513_H207_0249_AD2B9LACXX/
GRC270_DEHP2_67C
cutadapt version 1.2.1
Command line parameters: -a AGATCGGAAGAGCACACGTCT -o /illumina/runs/Runs/140513_H207_0249_AD2B9LACXX/
/illumina/runs/Runs/140513_H207_0249_AD2B9LACXX/
Maximum error rate: 10.00%
   No. of adapters: 1
   Processed reads:      2139267
   Processed bases:    109102617 bp (109.1 Mbp)
     Trimmed reads:      2075206 (97.0%)
     Trimmed bases:     53680380 bp (53.7 Mbp) (49.20% of total)
   Too short reads:            0 (0.0% of processed reads)
    Too long reads:            0 (0.0% of processed reads)
        Total time:    155.78 s
     Time per read:      0.07 ms

=== Adapter 1 ===

Adapter 'AGATCGGAAGAGCACACGTCT', length 21, was trimmed 2075206 times.

######################

The first line (sample name) is the only one that does not have an identifier.
The remaining lines are all just an issue of finding a search term (e.g. "Processed reads" and printing the line.

The output should be like this:

GRC270_DEHP2_67C
 Processed reads:      2139267
Trimmed reads:      2075206 (97.0%)
Sample2 
Processed reads
Trimmed reads
Sample N
Processed reads
Trimmed reads

thanks, and hopefully this is clear.

Your output doesn't really help us without your input.

So you want to capture 3 lines after a search pattern?

awk '/Processed reads/ { N=3 } (N--)>0' inputfile > outputfile

thanks, I updated my input description.