expect脚本

        expect -c "spawn ssh [email protected];
                        expect \"*assword\";
                        send \"xxxxxxxx\r\";
                        expect \"*# \"
                        send \"nohup rds-stress -q 256 -a 256 -d 16 -t 16 -o -Q $i &\r\"
                        send \"sleep 2 && exit\r\"
                        expect eof
                "
 

猜你喜欢

转载自blog.csdn.net/mounter625/article/details/86490542