I want to write a bash script in order to get two IP addresses and shows me whole range between them...
I'm trying but unfortunately no result...
Could you possibly help me?
I found this one but not complete:
addresses=( `< listofnums` )
network=${addresses[0]%.*}
hosts=( ${addresses[@]##*.} )
for (( i=${hosts[0]}; i<255; ++i ))
do
case "${hosts[@]}" in *"$i"*) ;; *) echo "$network.$i" ;; esac
done
This script would get for example 1.1.1.1 5.4.6.3
and cat me whole range between them.