mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 21:42:39 +00:00
23 lines
242 B
Tcl
23 lines
242 B
Tcl
#!/usr/bin/env bash
|
|
#!/bin/expect
|
|
|
|
# Set timeout
|
|
set timeout 600
|
|
|
|
# Get arguments
|
|
set query [lindex $argv 0]
|
|
|
|
spawn mysql -u root
|
|
|
|
expect "mysql>"
|
|
send "use hits\r"
|
|
|
|
expect "mysql>"
|
|
|
|
send "$query\r"
|
|
|
|
expect "mysql>"
|
|
|
|
send "quit\r"
|
|
|
|
expect eof |