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
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
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
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
4 matches
Mail list logo