SQLite define output field separator on a single line command SQLite define output field separator on a single line command sqlite sqlite

SQLite define output field separator on a single line command


The -separator option does what you want:

sqlite3 -separator ';;;' con.db "SELECT ..."

The only way to format the output so that you are guaranteed to not get the separator in the values is to quote all strings:

sqlite3 con.db "SELECT quote(name), quote(cell), quote(email) FROM contacts"

However, this would require you to parse the output according to the SQL syntax rules.