您的位置:首页 > 运维架构 > Linux

老李分享:《Linux Shell脚本攻略》 要点(六)下

2015-12-16 16:19 302 查看
5、系统运行时间监视<pre name="code" class="plain" style="font-size: 14px;">[root@localhost program_test]# cat ssh_test.sh
#!/bin/bashIP_LIST="192.168.119.1 192.168.119.2 192.168.119.128"
USER="yxy"for ip in $IP_LIST;
do
utime=$(ssh $USER@$ip uptime | awk '{ print $3 }' )
echo $ip uptime: $utime
done
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  软件测试开发