I have extremely large log file that I need to process and save for csv format every hour.
the format is like below ( this line also after removed many characters using sed)
Apr-05 11:10:12 xxxx xxx xxxx xxxx xxxx
I need to save this as
04-05 11:10:12,xxxx,xxx,xxxx,xxxx,xxxx
I tried set variable using $1 and try to convert it using GNU date but not working
awk -v fixdate="($1 +%m-)" '{print fixdate"-"$2" "$3 "," $x "," $y "," $z}'
I prefer single line method to do this.
How can I assign $1 (Apr-05) part to awk variable and process it with GNU date before printing.