SQLite User Forum

Tried with .read - Execute SQL script stored in a table
Login
One way:
<code>
\> sqlite3 sqlcmd.sdb
SQLite version 3.33.0 2020-08-14 13:23:32
Enter ".help" for usage hints.
sqlite> create table ShellCmds (name text unique, cmd text, rank integer);
sqlite> insert into ShellCmds values('DoIt', '.schema', 1);
sqlite> insert into ShellCmds values('Blat', 'select * from People', 2);
sqlite> .q
\
\> sqlite3_v3r33r0_patched.exe furd.sdb
SQLite version 3.33.0 2020-08-14 13:23:32, except patched
  per https://www.sqlite.org/src/info/6c716f4b556ea8f9  .
Enter ".help" for usage hints.
sqlite> .read '| sqlite3 -noheader sqlcmd.sdb "select cmd from ShellCmds where rank = 2;"'
1|Jack|Sprat|could.eat@no.fat|
2|His|wife|could.eat@no.lean|
3|And|so|betwixt.the@two.of them|
4|They|licked|the.platter@clean.|
5|Jack|ate|all.the@lean.,|
6|Joan|ate|all.the@fat.|
7|The|bone|they.picked@it.clean,|
8|Then|gave|it.to@the.cat|
9|Jack|Sprat|was@wheeling|
10|His|.wife|by.the@ditch.|
11|The|barrow|turned@over,|
12|And|in|she@did.pitch.|
13|Says|Jack|"She'll@be.drowned!"|
14|But|Joan|did@reply,|
15|"I|don't|think@I.shall,|
16|For|the|ditch.is@quite.dry."|
17|Snurdly|Snodgrass|.@.|
sqlite> 
</code>