You can try:
awk '
{
match($0, /t=([^[:blank:]]*)[[:blank:]]/, a)
ss= "t=\""strftime("%I:%M:%S%p %Z %m-%d-%G",a[1])"\" "
sub(/t=[^[:blank:]]*[[:blank:]]/,ss)
print
}' file
Explanation:
$0
is the whole line except for the trailing newline. We do not need to specify any field separators since we work on the whole line and not particular fields.- The regular expression
/t=([^[:blank:]]*)[[:blank:]]/
searches for the string "t=" followed by a set of non-blanks. Since we have parenthesis around that, that is:([^[:blank:]]*)
, we can later refer to that part asa[1]
. - We then format the time string.
- And we substitute it back into the whole line
- We print the line