Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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