Extracting information from a template

I have a template that I usually use to generate stats on an hourly basis for a number of cell sites altogether. I would like to be able to write a script that would go to the template and extract the information for any single site at any time during the day. For example, let's say that my database has 24 sites (named a to z), I only want to retrieve the stats for site "m" at 11:23 today. How do I accomplish that?

Thanks for the help!!

It would help if you would provide a sample of what the template looks like.

Guys, I am waiting for your input to this. Let me know what you think.

That should help!!! See below:

%set r_totaldrop 0
%set r_totalassgn 0
%set r_totalseiz 0
%set r_droprate 0
%set r_accessrate 0

%set nc 0 # Number of CDMA cell site faces
%set num_lines 0
%set need_header 1

"Cell PAF OrigSeiz OrigAssgn TermSeiz OrigAssgn CSupF cSHO %Comp HH %Comp HA %
Comp 3GPkCE Erlang SecErlang 3GDrop AcsAvg Peak PgAvg Peak FOVF %Hour
ROVF %Hour Unl CellPPBlk CellActFail CellTCCCF CSHTHoff MRFERII F1 F2 F3 F4\n"

%for c = a to z

%set r_ppblk 0
%set r_actfail 0
%set r_tccf 0

I am not getting a clear picture of what exactly you need.Could you show a sample input and sample output..