#
$barra="";
$comb=0;
$fichero="por3bis4.txt";
open(FICH,$fichero) or die "No puedo abrir $fichero" ;
print "COPY esfuerzos_combi from stdin;\n";
while (<FICH>) {
@terminos =split;
if (/COMBINACION/) {
 $comb =$terminos[1];
  } elsif ( /(^[0-9]*\/[0-9]*)/) {
   $barra=$terminos[0];
 } else {
   if($barra!="" && $comb>0 && !/^ *$/) {
 print $barra . "\t" . $comb . "\t" . $terminos[0] . "\t" . $terminos[2] . "\t" . $terminos[3] .
     "\t" . $terminos[4] . "\t" . $terminos[5] . "\t" . $terminos[6] . "\t" . $terminos[6] . "\n";
 }
 };
};
print"\\.\n";
close(FICH);
