Wed, 26 Sep 2012 14:59:57 +0200 Clemens Ladisch <clem...@ladisch.de> wrote:

>somebody wrote:
>> .mode tabs does not work:
>>
>> sqlite3 <<EOF
>> .mode tabs
>> .show
>> EOF
>> ...
>> separator: "\t"
>
>Obviously, it does work.
>
>> echo -ne "\"\t" >f && sqlite3 <<EOF
>> create table t(a text, b text);
>> .mode tabs
>> .import f t
>
>".mode" sets the *output* mode.
>
>
>Regards,
>Clemens

You are right, ".mode" sets the *output* mode, but also changes "separator" 
(used by output mode and .import).

1. ".mode tabs" works strange:

echo -e ".show\n.mode tabs\n.show" | sqlite3 | grep mode
     mode: list
     mode: list

2. "separator" changes to "\t", but cannot .import files with "\"":

echo -ne "\"\t" >f && sqlite3 <<EOF
create table t(a text, b text);
.separator "\t"
.import f t
EOF
Error: f line 1: expected 2 columns of data but found 1
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to