mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-07 16:17:37 -06:00
33 lines
412 B
Plaintext
Executable File
33 lines
412 B
Plaintext
Executable File
#!/usr/bin/expect -f
|
|
|
|
set timeout 5
|
|
spawn dolt sql
|
|
|
|
expect {
|
|
"> " { send "select 23;\r"; }
|
|
timeout { exit 1; }
|
|
}
|
|
|
|
expect {
|
|
"| 23 |" { }
|
|
timeout { exit 1; }
|
|
}
|
|
expect {
|
|
"| 23 |" { }
|
|
timeout { exit 1; }
|
|
}
|
|
|
|
expect {
|
|
"> " { send "exit;\r"; }
|
|
timeout { exit 1; }
|
|
}
|
|
|
|
expect {
|
|
eof { }
|
|
timeout { exit 1; }
|
|
}
|
|
|
|
set waitval [wait -i $spawn_id]
|
|
set exval [lindex $waitval 3]
|
|
exit $exval
|