Shell Script for IP address
Posted on 2007-08-02
Program like ping/traceroute/nslookup in Linux/Unix only accept single ip address. So for instance If I am want to know whether 10 hosts are up or not, i need to type ping <ip address> 10 times, one by one. The other option is to use other program or software that can accept multiple ip address.
I am thinking to create a shell script that can take multiple ip address and translate it into the right format.
Say for instance
22.214.171.124-50 should be translated into 126.96.36.199 to 188.8.131.52
Could you please give me a guidance or sample script so that I could modify and incorporate the shell script ?