On 11/9/16, Luca Ferrari wrote:
> Hi all,
> this could be trivial, but assuming I need some shell script to query
> SQLite3 databases with variable-interpolated queries, what can I do?
I typically using "tclsh" for this. https://www.tcl-lang.org/
SQLite is really a TCL
On 11/09/2016 02:39 PM, Luca Ferrari wrote:
Hi all,
this could be trivial, but assuming I need some shell script to query
SQLite3 databases with variable-interpolated queries, what can I do?
Of course the following does not work because ticks prevent variable
interpolation:
COUNT=`sqlite3 $db
COUNT=$(sqlite3 "$db" "SELECT COUNT(*) FROM foo WHERE baz='$BAZ'") should
totally work (I quoted $BAZ as a string, don't do that if it is a number,
and you should escape any ' in $BAZ).
On Wed, Nov 9, 2016 at 11:40 AM Clemens Ladisch wrote:
> Luca Ferrari wrote:
> > this
Luca Ferrari wrote:
> this could be trivial, but assuming I need some shell script to query
> SQLite3 databases with variable-interpolated queries, what can I do?
> Of course the following does not work because ticks prevent variable
> interpolation:
>
> COUNT=`sqlite3 $db 'SELECT COUNT(*) FROM
Hi all,
this could be trivial, but assuming I need some shell script to query
SQLite3 databases with variable-interpolated queries, what can I do?
Of course the following does not work because ticks prevent variable
interpolation:
COUNT=`sqlite3 $db 'SELECT COUNT(*) FROM foo WHERE baz=$BAZ'`
and
5 matches
Mail list logo