Re: [sqlite] import tab separated values from bash command

2008-08-30 Thread Igor Tandetnik
"Jan Ptacek" <[EMAIL PROTECTED]> wrote
in message
news:[EMAIL PROTECTED]
> I am a bit struggling with following commands from my Makefile
>   sqlite3 ${DB} '.read create.sql'
>   sqlite3 ${DB} '.separator "\t"'
>   sqlite3 ${DB} ".import  filtered.freqlist.tsv table"
>
> this obviously wont work, because the third incarnation of sqlite has
> the std separator set.

Create a temp file with these three lines, then run sqlite3 once with 
this file as standard input.

Igor Tandetnik 



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] import tab separated values from bash command

2008-08-30 Thread Jan Ptacek
Hello everyone.

I am a bit struggling with following commands from my Makefile
   sqlite3 ${DB} '.read create.sql'
   sqlite3 ${DB} '.separator "\t"'
   sqlite3 ${DB} ".import  filtered.freqlist.tsv table"

this obviously wont work, because the third incarnation of sqlite has the
std separator set.
i have injected and sed inbetween to turn \t into pipes
but it doesnt feel right ;)

is there a way how to set separator and import at once from one bash cmd?

best regards
Jan Ptacek
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users