Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
get ips from ping command
$ for i in {1..20}; do echo `echo s$i.vpnst.com;ping -c1 s$i.vpnst.com|grep -o '(.\+)'`; done
s1.vpnst.com (106.187.39.125)
s2.vpnst.com (96.44.186.158)
s3.vpnst.com (106.187.39.125)
s4.vpnst.com (109.169.68.137)
s5.vpnst.com (173.231.12.99)
s6.vpnst.com (76.164.225.211)
s7.vpnst.com (74.82.183.119)
s8.vpnst.com (106.187.39.125)
s9.vpnst.com (76.74.172.234)
s10.vpnst.com (216.18.195.42)
s11.vpnst.com (106.187.39.125)
s12.vpnst.com (106.187.39.125)
s13.vpnst.com (103.6.84.152)
ping: cannot resolve s14.vpnst.com: Unknown host
s14.vpnst.com
s15.vpnst.com (106.187.39.125)
s16.vpnst.com (106.187.37.69)
ping: cannot resolve s17.vpnst.com: Unknown host
s17.vpnst.com
ping: cannot resolve s18.vpnst.com: Unknown host
s18.vpnst.com
ping: cannot resolve s19.vpnst.com: Unknown host
s19.vpnst.com
ping: cannot resolve s20.vpnst.com: Unknown host
s20.vpnst.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment