Sunday, 27 August 2017

non-blocking ping range with julia


a=[]
for i in 1:254  
    @spawn push!(a, [i, 
        match(r"time=(.*)$", 
            split(readstring(`ping -c 1 10.27.96.$i`),  "\n", 
            keep=false)[2])[1]])  
    print(i)  
    sleep(0.1)  
end  
after a line from https://discourse.julialang.org/t/how-can-i-ping-an-ip-adress-in-julia/3380

No comments:

Post a Comment