Skip to content

Instantly share code, notes, and snippets.

@vmanyushin
Last active March 6, 2018 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vmanyushin/39a30b2b9f0247bf144699df71ef73f9 to your computer and use it in GitHub Desktop.
Save vmanyushin/39a30b2b9f0247bf144699df71ef73f9 to your computer and use it in GitHub Desktop.
# 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