I am executing sqlite as:
sqlite3 -batch -cmd "select col2 from mytable where col1 = 'myvalue';" mydb
I want it to execute the select statement and exit, but instead it sits there and waits for further input, wanting an .exit command.
I do not have the option of doing </dev/null as I am executing the command programmatically and not from a shell script.
How can sqlite3 exit in a one-line command without using shell redirection or pipes?
Aucun commentaire:
Enregistrer un commentaire