标签:highlight file bsp div 密码 lan argv send created
一个偷懒的小shell,
#!/usr/bin/expect #************************************************************************* # > File Name: expect.sh # > Author: chenglee # > Main : chengkenlee@sina.com # > Blog : http://www.cnblogs.com/chenglee/ # > Created Time : 2019年01月30日 星期三 18时16分56秒 #************************************************************************* set user root set pass lizhenghua set dir /home/newland/filesend set ip 192.168.137.176 set filen [lrange $argv 0 0] spawn scp ${filen} ${user}@${ip}:${dir} expect "${user}@${ip}‘s password:" send "${pass}\r" interact
scp.sh + 要传送的文件
标签:highlight file bsp div 密码 lan argv send created
原文地址:https://www.cnblogs.com/chenglee/p/10337381.html