我是一个糟糕的初学者:
f = io.popen("ping -c 2 -t 5 192.168.0.1") l = f:read("*a") f:close() if f==0 then print ("active") else print ("off") end
local f = io.popen("ping -c 2 -t 5 192.168.0.1") local l = f:read("*a") f = f:close() if f then print ("active") else print ("off") end
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
点击生成二维码
我来说两句