Skip to content

Instantly share code, notes, and snippets.

@supermasita
Created May 17, 2016 17:53
Show Gist options
  • Save supermasita/3a5cf05fd980420f9f7d07f610a9ba4e to your computer and use it in GitHub Desktop.
Save supermasita/3a5cf05fd980420f9f7d07f610a9ba4e to your computer and use it in GitHub Desktop.
BASH - Export SQLite to CSV - Example
#!/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