join 0001_2006_249_1340_001.txt jd249_utm.txt > 0001_2006_249_1340_001.spt
#! /bin/csh awk '{FS=" "} {OFS=" "} {printf "%5s %25s %5.0f %6s %7s\n", \ cruise,line,$2,$3,$4,$1} ' cruise=06018 line=$1 $1.spt >> $2.spnavThis shell script could be called with the following command line example:
formatjday 0001_2006_249_1340_001 249