check repos list for fastest ping

cat repos.txt | while read line; do echo $line | cut -d"/" -f 3 | fping -e ;done
This helps me determine which repo I want to use for downloading ISO files
Sample Output
reflector.westga.edu is unreachable
bay.uchicago.edu is alive (61.5 ms)
mirror.vcu.edu is alive (76.7 ms)
mirror.chpc.utah.edu is alive (36.8 ms)
mirrors.centarra.com is alive (43.7 ms)
centos.expedientevirtual.com is alive (65.7 ms)
mirrors.loosefoot.com is alive (48.6 ms)
mirror.ash.fastserv.com is alive (70.6 ms)
ftp.ussg.iu.edu is alive (68.5 ms)
centos.escapemg.com is alive (46.4 ms)
linux.mirrors.es.net is alive (23.6 ms)
mirror.cisp.com is alive (69.3 ms)
mirror.san.fastserv.com is alive (13.9 ms)
mirrors.psychz.net is alive (20.3 ms)
mirror.oss.ou.edu is alive (57.2 ms)
ICMP Unreachable (Communication Administratively Prohibited) from 131.247.254.35 for ICMP Echo sent to ftp.usf.edu (131.247.253.85)
ftp.usf.edu is unreachable
mirror.nandomedia.com is alive (93.4 ms)
yum.tamu.edu is alive (41.8 ms)
centos.mirror.lstn.net is unreachable
centos.netnitco.net is alive (69.2 ms)
mirror.thelinuxfix.com is alive (63.1 ms)
mirrors.umflint.edu is alive (70.0 ms)
mirror.supremebytes.com is alive (10.1 ms)
centos.mirrors.tds.net is alive (51.8 ms)
mirror.hmc.edu is alive (16.8 ms)
mirror.steadfast.net is alive (64.3 ms)
mirrors.xmission.com is alive (28.4 ms)
centos.hostingxtreme.com is alive (65.7 ms)
mirror.umd.edu is alive (72.0 ms)
centos.mia.host-engine.com is alive (66.9 ms)
mirrors.lga7.us.voxel.net is alive (77.2 ms)
mirrors.cmich.edu is unreachable
mirror.us.leaseweb.net is alive (71.9 ms)
centos.mirror.constant.com is alive (83.2 ms)

0
By: rawm
2015-02-17 06:34:07

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: