script the output with awk

Please i need your help.

i made this script with awk, this scripts count and list a pattern for each directory in the output as shown. but not as desired. i want the output will be listed in a tabular way, using awk:

cuenta_cdrs()
{
for dir in *
do
cd $dir
for file in *
do
if [ -f $file ]
then
cat listacdrs|awk '
BEGIN {print "dia", "\t", "Cantidad"}
$1 == prev {totaldia+=1}
$1 != prev {print prev,totaldia;totaldia=1;prev=$1;filas=filas+1}'
fi
done
cd ..
done
}

OUTPUT
dia Cantidad

01/09/2006 1275
02/08/2006 1285
03/08/2006 1310
04/08/2006 1300
05/08/2006 1415
dia Cantidad

01/09/2006 1275
02/08/2006 1285
03/08/2006 1310
04/08/2006 1300
05/08/2006 1415
06/08/2006 1265
dia Cantidad

01/09/2006 1275
02/08/2006 1285

But i want the output to be this way:

OUTPUT DESIRED
dia Cantidad dia cantidad

01/09/2006 1275 01/09/2006 1275
02/08/2006 1285 02/08/2006 1285
03/08/2006 1310 03/08/2006 1310
04/08/2006 1300 04/08/2006 1300
05/08/2006 1415 05/08/2006 1415

Thanks

Please ,show us the format of your input file.

Th e input file is called listacdrs and the format is:

01/10/2006 08:20 CF004
01/10/2006 08:25 CF006
..
04/10/2006 04:23 CF1020

---
DD/MM/YYY HH:MM CONCSECUTIVE NUMBER.
This purpose is count and list the number of consecutives per day usin awk, the results are ok with this script but i need to b elisted or output in a tabaular way for each directory but not be listea by pages.
I apprecitae your help please.

you can use paste command to do that

Try this:

cuenta_cdrs()
{
 for dir in *
 do
  cd $dir
  for file in * 
  do 
   if [ -f $file ]
   then
    awk '
    BEGIN {print "dia", "\t", "Cantidad"}
    $1 == prev {totaldia++}
    $1 != prev {printf("%s\t%s\n",prev,totaldia);totaldia=1;prev=$1;filas++}' listacdrs
   fi 
  done
  cd .. 
 done
}

Regards.