Re: [sqlite] Updating blob columns from files by command-line

2010-02-07 Thread Ben Gorte - LR
How about (for a start): for i in *.txt; do sqlite3 dir.db "insert into texts values('$i', '`cat $i`');"; done Probably there shouldn't be any single quotes in the contents. Ben G > Given table texts(filename text, contents blob) and a directory of plain > text files, is it possible (using

Re: [sqlite] Updating blob columns from files by command-line

2010-02-05 Thread Kees Nuyt
On Fri, 5 Feb 2010 09:18:27 -0500, "Paul Craven" wrote: >Given table texts(filename text, contents blob) and a directory of plain >text files, is it possible (using the command line interface alone) to >populate the table with the names and contents of all the text files, one

Re: [sqlite] Updating blob columns from files by command-line

2010-02-05 Thread Simon Slavin
On 5 Feb 2010, at 2:18pm, Paul Craven wrote: > Given table texts(filename text, contents blob) and a directory of plain > text files, is it possible (using the command line interface alone) to > populate the table with the names and contents of all the text files, one > file per record? You

[sqlite] Updating blob columns from files by command-line

2010-02-05 Thread Paul Craven
Given table texts(filename text, contents blob) and a directory of plain text files, is it possible (using the command line interface alone) to populate the table with the names and contents of all the text files, one file per record? Thanks in advance, Paul Craven