Exit the SQLite shell on Android

送分小仙女□ 提交于 2021-01-02 05:46:32

问题


I'm using SQLite 3 on Mac OS X'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 + 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.

How can I restore sanity to the terminal after such errors without relaunching the terminal?


回答1:


Type ; and press Enter.

This might fix it. This works for other SQL stuff.




回答2:


You have just to type

sqlite> .exit



回答3:


You can even try this

  • For Windows

    Ctrl + Z

  • For a Unix terminal

    Ctrl + D

(It sends end of file to standard input.)



来源:https://stackoverflow.com/questions/8648652/exit-the-sqlite-shell-on-android

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!