This is a fork from of Ping all AWS EC2 IPs script. It didnt work for me so I had to figure it out on my own. I only copied IPs from http://ec2-reachability.amazonaws.com for Europe(Ireland, London, Paris, Frankfurt & Stockholm). It's easy to make your own csv files with your own regions.
To run the script
- chmod u-x scriptname.sh
- then just run # bash scriptname.sh OR simply # ./scriptname.sh the result will be printed in your shell.
- If you'd like to output its results into a file, just run this # ./scriptname.sh > results.txt
That's it!
Things to do:
- tidy up the output. For some weird reason script fails to process the first ping sometimes and prints out an error. Also, it prints the variables as the first line of the output, no idea why for now.
- figure out how to nicely columnise the output. For now
column
doesnt pick up the output fully. - Add an option to ping only particular country.
- make this script available to run with wget/curl