export_csv.sh 515 B

1234567
  1. #!/usr/bin/env bash
  2. sqlite3 -header -csv ./dist/data.sqlite 'SELECT * FROM province ORDER BY code;' > ./dist/provinces.csv
  3. sqlite3 -header -csv ./dist/data.sqlite 'SELECT * FROM city ORDER BY code;' > ./dist/cities.csv
  4. sqlite3 -header -csv ./dist/data.sqlite 'SELECT * FROM area ORDER BY code;' > ./dist/areas.csv
  5. sqlite3 -header -csv ./dist/data.sqlite 'SELECT * FROM street ORDER BY code;' > ./dist/streets.csv
  6. sqlite3 -header -csv ./dist/data.sqlite 'SELECT * FROM village ORDER BY code;' > ./dist/villages.csv