Within one of my awk scripts, I have three variables extracted and calculated on. When done, I simply want to combine the three. The following works, but looks weird. My script reads a field that has text and numbers, knowing the last four comprise MMYY (month and year)
# YY are last two digits; MM are two previous
dtYY=substr(date_raw,length(date_raw)-1,2)
dtMM=substr(date_raw,length(date_raw)-3,2)
# CC is for century; assume 90 as breakpoint meaning 1990 while 89 equals 2089
if ( dtYY >= 90) dtCC=19
else dtcc=20
dtCCYYMM=dtCC""dtYY""dtMM
The above last line is the command line in question -- what else can I do to separate the three fields as I combine into one?