1

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 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .