I have a file with following enteries
Nov 29 15:15 ,alert_logevent
Nov 29 15:15 ,alert_webhook
Nov 29 15:15 ,appsbrowser
Oct 20 2017 ,ClearPassOnSplunk_2
Oct 10 2017 ,Dnslookup
Oct 12 2017 ,domainCategories
I want to convert date time to YYYYMMDDHHMMSS with out using loops some thing like this
cat SOMEFILE_WITH_DATE_AND_DATE | awk '{print "date -d \""$1, $2, $3"\"" " +" "%Y%m%d%H%M%S" , $4 }'
I want the output to look like this
20181129151500,alert_logevent
20181129151500,alert_webhook
20181129151500,appsbrowser
20181129151500,appsbrowser
and so forth
I tried system () function in awk but it does not accept more than 1 argument.
cat file | awk 'stuff'
; that's a Useless Use ofcat
. Instead,awk 'stuff' file
.system()
inawk
, unix.stackexchange.com/a/344855/14831 might be useful.