I'm trying to turn data from the last command into epoch time using the awk print. the code works on 10.14.5 all the time, and works on 10.13.6 some of the time. When I came into work this morning it worked fine, then around 11 started giving me errors.
Basically, awk is printing literal strings, then a newline character, then the literal strings and the variables as it should. for example, if $1="Hello", then:
awk '{print $1,"World"}'
is actually printing "World Hello World"
the actual line of code giving the error is this:
x=$(last -1 $a | awk '{print $3 " "$4 " " $5 " " $6 ":00 EDT "}')
where it should be setting x to "Fri May 31 12:43:00 EDT " for example, it is setting x to " :00 EDT Fri May 31 12:43:00 EDT "
EDIT: I should say that the $a in the line of code would be set to a username on the computer