I'm making a shell script to export a sqlite query to a csv file, just like this: #!/bin/bash ./bin/sqlite3 ./sys/xserve_sqlite.db ".headers on" ./bin/sqlite3 ./sys/xserve_sqlite.db ".mode csv" ./bin/sqlite3 ./sys/xserve_sqlite.db ".output out.csv" ./bin/sqlite3 ./sys/xserve_sqlite.db "select * from eS1100_sensor_results;" ./bin/sqlite3 ./sys/xserve_sqlite.db ".exit" When executing the script, the
![Export from sqlite to csv using shell script](https://cdn-ak-scissors.b.st-hatena.com/image/square/98d6f053a97a87156775f60757c60865d0f2c47d/height=288;version=1;width=512/https%3A%2F%2Fcdn.sstatic.net%2FSites%2Fstackoverflow%2FImg%2Fapple-touch-icon%402.png%3Fv%3D73d79a89bded)