Created
May 17, 2016 17:53
-
-
Save supermasita/3a5cf05fd980420f9f7d07f610a9ba4e to your computer and use it in GitHub Desktop.
BASH - Export SQLite to CSV - Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Export SQLite to CSV - Example | |
# Replace "$database" and "$table" | |
sqlite3 $database <<! | |
.headers on | |
.mode csv | |
.output $database.csv | |
select * from $table; | |
! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment