# This awk script is supposed to take the and pull out the data # for each line from the ASCII output of wind data ... # $1 = DATE # $4 = HR0 # $5 = HR1 # . # . # $24 = HR22 # $25 = HR23 BEGIN { FS = "|" OFS = "\t" } { # NR = current record DATE[NR] = $1 HR0[NR] = $2 HR2[NR] = $3 HR3[NR] = $4 HR4[NR] = $5 HR5[NR] = $6 HR6[NR] = $7 } END { # ORS = "" for (i=1; i<=NR; i++) { print DATE[i], HR0[i], HR1[i], HR2[i], HR3[i], HR4[i], HR5[i], HR6[i] } for (i=1; i<=NR; i++) { printf("%s %.3s %3.s\n", DATE[i], HR0[i], HR1[i]) } }