wastebaby 发表于 2015-10-17 13:01

a.sh
#!/bin/bash
until [ $# = 0 ]
do
i=$1
ssh-o StrictHostKeyChecking=no   root@192.168.1.$1 'df -h'
shift
done

执行:./a.sh   101 102 103 104 10x

wq4113 发表于 2015-11-25 14:33

不错,可以尝试下

小马猴 发表于 2015-12-03 13:27

回复 1# jinghefei


    expect就是给这种用法准备的~
页: 1 [2]
查看完整版本: shell自动登入登出