From: Nicolas Boisselier Date: Tue, 22 Oct 2024 08:40:52 +0000 (+0200) Subject: etc/profile.d/sys.sh X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=7228ada38a2626bd0783b3dff7561e16ea94215a;p=nb.git etc/profile.d/sys.sh --- diff --git a/etc/profile.d/sys.sh b/etc/profile.d/sys.sh index fecae827..03ac17c3 100644 --- a/etc/profile.d/sys.sh +++ b/etc/profile.d/sys.sh @@ -222,7 +222,7 @@ sys_ips() { ips() { shell_help "Usage: $FUNCNAME [INTERFACE]. Print ip adresses." "$@" && return 1 - if which ip 2>/dev/null + if which ip >/dev/null then ip -o addr show | awk -F'[ /]+' '/ inet / && $4 != "127.0.0.1" {print $4}' else