3

I was using sqlite to connect to MyVideos75.db when I noticed that the usual method of getting "un-stuck" from the sqlite prompt (entering a semicolon) wasn't working:

pi@raspbmc:~/.xbmc/userdata/Database$ sqlite3 MyVideos75.db 
SQLite version 3.7.13 2012-06-11 02:05:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select * from files where strFilename like %Recreation%';
   ...> 
   ...> ;
   ...> ;
   ...> .quit
   ...> ;
   ...> .exit
   ...> ;
   ...> 
   ...> ;
   ...> 

So... how do I get myself out of the prompt if .quit, .exit, and ; all don't work?

4

Figured it out when I opened it up in a tmux window because it was getting annoying to keep killing the terminal tabs; just do a ctrl+D and that will dump you back in the shell:

sqlite> select * from files where strFilename like %Recreation%';
   ...> 
   ...> ;
   ...> ;
   ...> .quit
   ...> ;
   ...> .exit
   ...> ;
   ...> 
   ...> ;
   ...> 
Error: incomplete SQL: select * from files where strFilename like %Recreation%';

;
;
.quit
;
.exit
;

;
pi@raspbmc:~/.xbmc/userdata/Database$
  • This answer is equally useful when developing for Android. +1. – yochannah Jun 7 '15 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.