Documentation Source Text

Check-in [f157179986]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Correct CLI usage example noted by https://sqlite.org/forum/forumpost/e8bd8ea240
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f157179986383f69eefcbd3b5dfbff4934a85d51cd0f82842b3b381470ed1cae
User & Date: larrybr 2022-01-14 16:52:03
Context
2022-01-14
17:39
Update and modernize docs for CLI's .import (check-in: 955f03c451 user: larrybr tags: trunk)
16:52
Correct CLI usage example noted by https://sqlite.org/forum/forumpost/e8bd8ea240 (check-in: f157179986 user: larrybr tags: trunk)
2022-01-13
12:27
For printf family, mention "*" as a precision spec (check-in: 8bd010d038 user: larrybr tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/cli.in.

1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
arguments, the second argument is passed to the SQLite library
for processing, the query results are printed on standard output
in list mode, and the program exits.  This mechanism is designed
to make sqlite3 easy to use in conjunction with programs like
"awk".  For example:</p>

<tclscript>DisplayCode {
$ (((sqlite3 ex1 'select * from tbl1' |)))
> ((( awk '{printf "<tr><td>%s<td>%s\n",$1,$2 }')))
<tr><td>hello<td>10
<tr><td>goodbye<td>20
$
}</tclscript>

<tcl>hd_fragment endsh</tcl>
<h1>Marking The End Of An SQL Statement</h1>







|
|







1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
arguments, the second argument is passed to the SQLite library
for processing, the query results are printed on standard output
in list mode, and the program exits.  This mechanism is designed
to make sqlite3 easy to use in conjunction with programs like
"awk".  For example:</p>

<tclscript>DisplayCode {
$ (((sqlite3 ex1 'select * from tbl1' \)))
> ((( | awk '{printf "<tr><td>%s<td>%s\n",$1,$2 }')))
<tr><td>hello<td>10
<tr><td>goodbye<td>20
$
}</tclscript>

<tcl>hd_fragment endsh</tcl>
<h1>Marking The End Of An SQL Statement</h1>