Re: [sqlite] Need some help running sqlite3 command line

2017-03-07 Thread Chris Green
Jacob Sylvia wrote: > I know what the problem was... bash was interpreting the `table_name` piece > as a command. I had to escape the backticks... > Yes, `command` is the old-fashioned way of saying $(command) in bash. -- Chris Green · ___ sqlite-us

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Jacob Sylvia
ers [mailto:sqlite-users-boun...@mailinglists.sqlite.org] > > On Behalf Of Jacob Sylvia > > Sent: Monday, 6 March, 2017 17:10 > > To: SQLite mailing list > > Subject: Re: [sqlite] Need some help running sqlite3 command line > > > > So apparently the version of sqli

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Keith Medcalf
e('privkey.pem') WHERE ID=4;" > -Original Message- > From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] > On Behalf Of Jacob Sylvia > Sent: Monday, 6 March, 2017 17:10 > To: SQLite mailing list > Subject: Re: [sqlite] Need some help running sqlite3

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Jacob Sylvia
I know what the problem was... bash was interpreting the `table_name` piece as a command. I had to escape the backticks... This looks like it's going to work like a charm!!! I'll report back! ~Jake -- Jacob D. Sylvia Jake Sylvia's Consulting 430 Cole St. Seekonk, MA 02771 Cell: (508) - 954 - 2

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Richard Hipp
On 3/6/17, Jacob Sylvia wrote: > > How can I check if that support is compiled in? > The readfile() SQL function was add to the command-line shell in SQLite version 3.8.6 released on 2014-08-15. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mail

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Jacob Sylvia
So apparently the version of sqlite3 that comes with FreeNAS (3.14.1 2016-08-11 18:53:32 a12d8059770df4bca59e321c266410344242bf7b) AND the (older) version that comes with Ubuntu 16.04 (3.11.0 2016-02-15 17:29:24 3d862f207e3adc00f78066799ac5a8c282430a5f) don't support the readfile method: ./update_

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Jacob Sylvia
Keith, thanks! I *think* this is exactly what I'm looking for. I will try this as soon as I get home. ~Jake -- Jacob D. Sylvia Jake Sylvia's Consulting 430 Cole St. Seekonk, MA 02771 Cell: (508) - 954 - 2536 EMail: jacob.syl...@gmail.com Web: http://www.jacobsylvia.com On Mon, Mar 6, 2017 at 9

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Keith Medcalf
If you have a recent enough version of the SQLite3 command line shell: sqlite3 config.db "update table set value=readfile('pubkey.pem') where key='pubkey';" sqlite3 config.db "update table set value=readfile('privkey.pem') where key='privkey';" or, create a file, called for example, updatekeys

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Hick Gunter
z 2017 13:25 An: SQLite mailing list Betreff: Re: [sqlite] Need some help running sqlite3 command line I guess I should have mentioned that I'm trying to do this from a script, so that makes the command shell difficult. ~Jake -- Jacob D. Sylvia Jake Sylvia's Consulting 430 Cole St. Se

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Clemens Ladisch
Jacob Sylvia wrote: > The problem lies in the 'value' part. Because the text has line breaks / > carriage returns, I can't figure out how to do it appropriately from the > command line. Just use line breaks: $ sqlite3 ":memory:" "select 'first line > second line';" first line second line

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Jacob Sylvia
--- > 1 > asql> select * from test; > a > -- > a > b > c > d > > -Ursprüngliche Nachricht- > Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] > Im Auftrag von Jacob Sylvia > Gesendet: Montag, 06. März 2017 13

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Hick Gunter
richt- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Jacob Sylvia Gesendet: Montag, 06. März 2017 13:02 An: SQLite mailing list Betreff: Re: [sqlite] Need some help running sqlite3 command line Right... I know the syntax. The problem lies in the 'value&

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Jacob Sylvia
Right... I know the syntax. The problem lies in the 'value' part. Because the text has line breaks / carriage returns, I can't figure out how to do it appropriately from the command line. I've tried setting the value in a bash variable, but the breaks get interpreted and the syntax fails. ~Jake

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Clemens Ladisch
Jacob Sylvia wrote: > Basically, I cant figure out how to update a text field in the sqlite > config database from the command line... sqlite3 config.db "UPDATE SomeTable SET SomeColumn = 'value' WHERE ID = 42" You need to know the database file name, the table name, the column name(s), the new v