Last active
December 20, 2015 06:48
-
-
Save Forever-Young/6088173 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
# get current network, eg. 192.168.1.0/24 | |
ip addr show dev $(ip route | grep default | cut -d" " -f5) | grep inet | xargs echo | cut -d" " -f2 | xargs ipcalc -n -b | grep Network | xargs echo | cut -d" " -f2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment