SQLite Forum

Extract files from sqlar with a directory prepended
Login
```
sqlite> SELECT
   ...> ('/home/aho/tmp/' || name),
   ...> writefile(('/home/aho/tmp/' || name), sqlar_uncompress(data, sz), mode, mtime)
```

I don't want to use the path literally like `'/home/aho/tmp/'` in a sqlite session. Is there a way to specify the parameter `$dir` via the command line as in `sqlite3 test.sqlar -A --extract --directory ~/tmp /etc/logrotate.conf`? So that I can call the command returned by `-n` without replacing the variables like `$dir` to their actually value?