shell执行错误信息,line 3: IPADDR: command not found ;line 5: IPADDR1: command not found 求教
1#!/bin/sh23IPADDR='192.168.72.200';45IPADDR1=$(ifconfigeth0|grep192.168.72.200|awk{'...
1 #!/bin/sh
2
3 IPADDR = '192.168.72.200';
4
5 IPADDR1 = $(ifconfig eth0 |grep 192.168.72.200|awk {'print $2'}|awk -F: {'print $2'});
6
7 if [ $IPADDR1 -eq $IPADDR ]; then
8
9 ps -ef |grep rsync |awk {'print $2'}|xargs kill -9
10
11 fi 展开
2
3 IPADDR = '192.168.72.200';
4
5 IPADDR1 = $(ifconfig eth0 |grep 192.168.72.200|awk {'print $2'}|awk -F: {'print $2'});
6
7 if [ $IPADDR1 -eq $IPADDR ]; then
8
9 ps -ef |grep rsync |awk {'print $2'}|xargs kill -9
10
11 fi 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询