系统相关
首页 > 系统相关> > Linux expect接收传参

Linux expect接收传参

作者:互联网

参考:

https://blog.csdn.net/vah101/article/details/83014338

 

  1.    
  2.   #!/usr/bin/expect
  3.    
  4.    
  5.   set host [lrange $argv 0 0]
  6.   set port [lrange $argv 1 1]
  7.   set db [lrange $argv 2 2]

执行expect脚本的命令为:

expect create_database.sh node1 5432 zz1

 

标签:传参,set,argv,csdn,lrange,Linux,zz1,expect
来源: https://www.cnblogs.com/kuangke/p/14702245.html