Linux expect接收传参
参考:
https://blog.csdn.net/vah101/article/details/83014338
-
-
#!/usr/bin/expect
-
-
-
set host [lrange $argv 0 0]
-
set port [lrange $argv 1 1]
-
set db [lrange $argv 2 2]
执行expect脚本的命令为:
expect create_database.sh node1 5432 zz1