Don't forget -batch for the greater certainty. So sqlite3 database.db -batch "select count(*) from sqlite_master limit 0"