Shell脚本Shell判断变量值是否存在ip$(ipaddr|sednr's^.inet(.)/24.$\1gp')if!$ip;thenecho"notok"elseecho"ok"fi判断某个端口是否启动pid$(lsofti:5000)if!$pid;t