[email protected] wrote:
> It's quite often (for me, at least) the case I need to do something like this
> from the command line:
>
> >sqlite3.exe my.db "insert into t values(`simple field','multi-line text
> >copied
> >from some other app')
>
> The problem is the multi-line text cannot be copy-pasted directly into the
> command line as the first newline will terminate the command. So, I've been
> using readline() like so:
>
> First, save the copied text into some arbitrary file (e.g., xxx), and then do
>
> >sqlite3.exe my.db "insert into t values(`simple field',readfile(`xxx'))
If you are using a UNIX-based system, you can try my "pipe" extension, which
would allow you to write:
insert into t values('simple field',cast(pipe('','xclip -o') as text));
You can download this and other extensions at:
http://zzo38computer.org/sql/sqlext.zip
(For Macintosh you may need to change "xclip -o" to the proper command on
Macintosh, which I don't know. For Windows, this extension is unlikely to work,
but you can try if you want to.)
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users