Last active
March 6, 2018 09:20
-
-
Save vmanyushin/39a30b2b9f0247bf144699df71ef73f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# find next free ip address | |
# fping required | |
# | |
export SUBNET=25; echo $(for i in $(seq 10 253); do ip="172.16.${SUBNET}.${i}"; fping -c 1 -t 500 $ip &> /dev/null; if [ $? -eq 1 ]; then echo $ip; break; fi; done) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment