Quote:
Actually I am little bit confused about substr() param list. If the line contains more than 12 parameter. and if i need the same thing for an interim parameter in that I case I can't get the code.
You are really confused. 12 is NOT the number of columns. substr($1,12,2) means extract two characters after 12th position for first column. Read awk/nawk manpage for substr syntax. The solution provided will work as long as the date/time is in first field.