On occasion I have had a need to import large amounts of data from
standard input via a pipe. Here's an example of how to import from a
pipe using sqlite3 on Ubuntu:
$ { grep -v '^#' <<eof
# create the table
create table foo (bar int) ;
eof
} | sqlite3 foo.sqlite
$ seq 1 1000000 | sqlite3 foo.sqlite '.imp "/dev/stdin" "foo"'
$ sqlite3 foo.sqlite 'select count(*) from foo; '
1000000
Regards,
- Robert
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users