#!/bin/bash
#
# The following simple awk routine was used to parse the TMPLTBANK files.  
#
#

for file in "$1*"
do
  gzip -dc $file | \
    awk 'BEGIN{FS=",";ORS=" ";i=0}
         /inspiral_effective_distance/ && i==0 { print $3 }
         /inspiral_effective_distance/ { print "\t",$9; i++ }
         i == 49 { print "\n";i=0 }'
done