Can someone help me out here as I can't get my awk command to output some simple 3 column CSv to SQl
CSV
01Aug2011,user,12
02Aug2011,userb,34
AWK
I know this one works for me
awk -F',' '{ print "INSERT INTO Testing (`Date`,`User`,`Usage`) VALUES (" "'"$1"'""," """'"$2"'""," """'"$3"'"")" ""}' new.csv > output.log
but not this one
awk -F',' '{ print "INSERT INTO Testing (`Date`,`User`,`Usage`) VALUES (" "`"$1"`""," """`"$2"`""," """`"$3"`"")" ""}' new.csv > output.log
LOAD DATA LOCAL INFILEwill be easier.