SQLite Forum

Extract files from sqlar with a directory prepended
Login
> If my understanding of https://sqlite.org/cli.html#sql_parameters is correct, I think it is to specify the parameters in a sqlite3 script or session. But I need the parameters in the command line just like the -C option of sqlite3 -A.

If you're saying "I need something like `sqlite3 -Axf my.sqlar --param \$dir=/my/dir --param \$dirOnly=42` to work", then no, that's not currently a supported use case, and the SQLite shell's archive logic will substitute its own values anyway.

For the general (hypothetical) case of:

```
sqlite3 -param '$a' Bob -param '$b' 42 my.db 'SELECT * FROM t WHERE name = $a AND age = $b'
```


that's for Dr. Hipp and the other maintainers to decide if they want to support this. Until then, you'll have to write your own script that feeds `sqlite3` with additional parameter table instructions, or fully-expanded queries.