# near2far.ak # This awk takes a two horizon SeisX 3D horizon file and copies # all of the time from trace 1 to all other traces BEGIN {# write out the first four lines (for two horizons) for ( i = 1; i <= 4; i++) {getline printf("%s\n",$0)} } { if ( $2 == 1) #cross line number 1 { miocene = $5 bsmnt = $6 } if ( substr($1,1,1) =="#" ) printf("%s\n",$0) #pass last line else printf ("%5d %5d %12.2f %12.2f %12.2f %12.2f\n",$1,$2,$3,$4,miocene,bsmnt) } END { }