14 lines
224 B
Tcl
14 lines
224 B
Tcl
package require sqlite
|
|
|
|
if {$argc!=2} {
|
|
puts stderr "Usage: %s DATABASE SQL-STATEMENT"
|
|
exit 1
|
|
}
|
|
sqlite db [lindex $argv 0]
|
|
db eval [lindex $argv 1] x {
|
|
foreach v $x(*) {
|
|
puts "$v = $x($v)"
|
|
}
|
|
puts ""
|
|
}
|
|
db close
|