Last active
April 3, 2023 09:39
-
-
Save FromeXo/40f2d710704b56e662c1a824210de9c5 to your computer and use it in GitHub Desktop.
Display IPs in a cool way
This file contains hidden or 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
| if command -v jq &> /dev/null | |
| then | |
| echo "IPs" | |
| ip -j -4 addr show | jq '.[].addr_info[] | .label + ": " + .local' | tr -d '"' | awk '{print $1 " " $2}' | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment