Home » Android » sql – Android exit sqlite shell

sql – Android exit sqlite shell

Posted by: admin June 15, 2020 Leave a comment

Questions:

I’m using sqllite3 on MacOSX’s adb shell to view my application database using:

#sqlite3 mydb.db
SQLite version 3.5.9
Enter ".help" for instructions
sqlite> quit
...> .quit
...>

After I wrongly typed the quit command above, instead of the .quit for example, the shell goes into the ...> prompt where none of the known commands seem to work. I can’t even get out by CTRL+C, CTRL+/, ESC, etc.

I have to APPLE+Q i.e. quit the terminal instance to restart. I know this isn’t exactly a programming question, but it really is annoying enough for me to write here.

Does any one know how to restore sanity to the terminal after such errors without relaunching terminal?

How to&Answers:

type ; and press enter.

This might fix it. This works for other sql stuff. Let me know if it works.

Answer:

You have just to type

sqlite> .exit

Answer:

You can even try this

-For Windows

Control-Z

  • For Unix Terminal

Control-D

(it sends End Of File to stdin).