Export from sqlite to csv using shell script

前端 未结 5 1583
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-27 09:54

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/sq         


        
5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-27 10:32

    Although the question is about shell script, I think it will help few of those who are just bothered about transferring the data from the sqlite3 database to a csv file.

    I found a very convinient way to do it with the firefox browser using SQLite Manager extension.

    Simply connect to your sqlite database file in firefox ( SQlite manager -> connect database ) and then Table -> Export table. You will be served with some more options that you can just click and try....

    In the end you get a csv file with the table u have chosen to be exported.

提交回复
热议问题