{ # convert Unix timestamp back to US-format date timestr = strftime("%m/%d/%Y %H:%M:%S",$1,1); printf("%s,", timestr); # output all the other values sequentially for (i=2;i<=NF;i++){ printf("%s,",$i); } # now give DOS line termination printf("\r\n"); } END{ # file originally terminated by this, assume it is significant! printf("%s\r\n", "[END]"); }