Suppose you want to dump a few columns from the transcript for seventh visit to subject 22 in our study ... say the columns containing for both parent and child utterances) to view them in Excel or Google Docs:
LDP_DB=$LDP/data/ldp.db
sqlite3 -header -separator "<TAB>" $LDP_DB 'SELECT id, time, p_utts, c_utts FROM utterances WHERE session=7 AND subject=22' > 22.07.xls
To insert a tab character type CONTROL + V
then T
. (That is, hold down the control key with the V
key, followed by T
.)
Alternatively, create a file named .sqliterc
in your home directory (~/.sqliterc
) and add the following lines:
.mode list
.header ON
.separator "\t"
Then you can just use the following:
sqlite3 $LDP_DB 'SELECT id, time, p_utts, c_utts FROM utterances WHERE session=7 AND subject=22' > 22.07.xls