Perché questo gawk con strftime non funziona in SUSE ma funziona su Ubuntu e MAC
Qui ho inserito $ 11 come stringa e funziona. gawk 'FS=\",\" {match($6,/([^\/])\/([^\/])\/([^\/]+)/,a); $11=sprintf(\"%d %02d -%d 0 0 0\",a[3],a[1],1);$6=sprintf(\"%d-%02d- %02d\",a[3],a[1],a[2]);$6=strftime(\"%Y-%m-%d %H:%M:%S\",mktime(\"2017 08 -3 0 0 0\")); print $1,$2,$3,$4,$5,$6,$7,$8,$9,$11,\"".date("Y-m-d H:i:s")."\"}' OFS=',' ./stock_File.csv > ./stock_File_DEMO.csv Ma quando provo questo gawk 'FS=\",\" {match($6,/([^\/])\/([^\/])\/([^\/]+)/,a); $11=sprintf(\"%d %02d -%d 0 0 0\",a[3],a[1],1);$6=sprintf(\"%d-%02d- %02d\",a[3],a[1],a[2]);$6=strftime(\"%Y-%m-%d %H:%M:%S\",mktime($11)); print $1,$2,$3,$4,$5,$6,$7,$8,$9,$11,\"".date("Y-m-d H:i:s")."\"}' …