How to execute query to a DB from a terminal and store output to a file?
- Try
man sqlite
- You'll find that
sqlite
expects a syntax such assqlite [options] filename [SQL]
- Then do this
sqlite [options] filename [SQL] > file_with_results.txt
and the result would be infile_with_results.txt
From what you write, I believe you need:
sqlite .mozilla/firefox/profile_name/places.sqlite "SELECT moz_places.url FROM moz_places;" > file_with_results.txt