From 7228ada38a2626bd0783b3dff7561e16ea94215a Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Tue, 22 Oct 2024 10:40:52 +0200 Subject: [PATCH] etc/profile.d/sys.sh --- etc/profile.d/sys.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.47.3