sqlite3 output with tabs from one line command
You can directly use .mode tab
when using sqlite in a shell script (for example) by using a here document like:
sqlite3 -header mydb <<EOF
.mode tabs
select * from table1;
EOF
This should work:
sqlite3 -separator $'\t' -header mydb "select * from table1"
The $ tells your shell to expand to a tab character.
This works on both Linux and Windows:
sqlite3 -header -cmd ".mode tabs" mydb "select * from table1"