#! /usr/bin/awk -f /^DATAFILE.*#.*/ { offset=substr($3, 2)/2448*2352 print $1" "$2" #"offset" "$4 next } /.*/ { print }