0

I have many .dat files containing specific fields such as <Overall>, <Content>, <Cleanliness> all with a number next to them.

I have the code to be able to extract the data from these fields using awk and sed commands, however how would I go about adding this data into a table in sqlite3?

Is there a way I can add all the values from a temporary file into a column?

1

what about ..

... | awk '{print "insert into T1 value(\"%s\",\"%s\",\"%s\")\n",$1,$2,$3}' > tmp.sql

then insert tmp.sql ?

using mysql I usualy do

 ... | awk '{print "insert into T1 value(\"%s\",\"%s\",\"%s\")\n",$1,$2,$3}' | mysql --mysqloptions

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.