linux bash环境下面给expect脚本传递参数
来源:互联网 发布:gif软件下载 编辑:程序博客网 时间:2024/06/05 03:44
#!/usr/bin/expect# file name :rauth# Usages : rauth username [ passworld ]# Description : 自动发送用户名与密码# 运行 myxrgsu -aif { $argc != 2 && $argc != 1 } { send_user "Usage:auth username \[password\]\n" send_user "\tthe default password equals 0000\n" exit}set name [lindex $argv 0]if { $argc == 2 } { set pass [lindex $argv 1]} else { set pass "0000" }spawn xrgsu# expect 开始expect "*user*" { send ${name}\r }expect "*password:" { send ${pass}\r }expect "*DHCP*" { send "\r" }expect "*auth*" { send "\r" }interact#EOF
- linux bash环境下面给expect脚本传递参数
- linux bash环境下面给expect脚本传递参数
- bash脚本的函数参数传递注意事项
- expect脚本参数传递,自动登陆远程主机
- ant给shell脚本传递参数
- shell脚本自动化部署-如何向expect脚本里面传递参数
- linux expect脚本
- linux下expect环境安装以及简单脚本测试
- linux下expect环境安装以及简单脚本测试
- linux环境C++执行bash脚本
- Linux中变量$#,$@,$0,$1,$2,$*,$$,$?的含义(给脚本传递参数)
- [Linux]Linux Shell脚本参数传递
- linux 给内核模块传递参数
- Linux 内核 给模块传递参数
- uboot给linux传递参数流程
- Linux 远程执行脚本 expect
- Linux Expect 脚本学习资源
- Ant:给Ant脚本传递参数的最佳实践
- 解决phpmyadmin链接表的附加功能尚未激活的问题
- oracle Hyperion
- IP地址
- 对象的生命周期回顾篇
- 自己为string写的一个Format函数
- linux bash环境下面给expect脚本传递参数
- CoreData学习笔记(始)
- AndroidManifest.xml文件组成
- struts+spring+hibernate
- ComboBox 不显示下拉框的困惑
- 占内存极小关键字变色的编译工具
- freeradius-aka配置笔记,自用
- 得到当前位置及卫星的状态
- Zynga今晚将公布面向Facebook应用的游戏计划