#!/bin/sh

# disable filename globbing

 echo Content-type: text/html
 echo
 BASE=`pwd`
APPLDIR=$BASE/appl
DATADIR=$BASE/data
PATH=$PATH:$BASE/ihd/bin:.
TZ=America/Santiago
export PATH APPLDIR DATADIR TZ

{
ihd/bin/ihmq reporte01 h08^ h01^ h02^ h03^ h04^ h37^ 
ihd/bin/ihmq reporte02 h08^ h01^ h02^ h03^ h04^ h43^ 
ihd/bin/ihmq reporte03 h08^ h01^ h02^ h03^ h04^ h97^ 
ihd/bin/ihmq reporte04 h08^ h01^ h02^ h03^ h04^ h16^ 
ihd/bin/ihmq reporte05 h08^ h01^ h02^ h03^ h04^ h18^ 
ihd/bin/ihmq reporte06 h08^ h01^ h02^ h03^ h04^ h67^ 
ihd/bin/ihmq reporte07 h08^ h01^ h02^ h03^ h04^ h18^ 
} |
awk -F^ '
function trail(txt) { while (substr(txt,length(txt),1)==" " ) txt=substr(txt,1,length(txt)-1); return (txt) }
{
for ( i=1;i<NF;i++) printf "%s^",trail($i)
print ""
} ' 


