Created
April 15, 2024 12:46
-
-
Save diasbruno/547c2da00cf7482af732730041a9a086 to your computer and use it in GitHub Desktop.
Find host's IP
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
#!/bin/env bash | |
set -eu | |
ip -br a s eth0 | awk '{ split($3,a,"/"); print a[1]; }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment