Replace hostname -I by `ip` parsed command

This commit is contained in:
gardouille 2023-08-30 17:50:46 +02:00
parent cf1f8c17b8
commit bda48a81c0
Signed by: gardouille
GPG Key ID: E759BAA22501AF32
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ RESET='\033[0m'
# ]]]
# Vars definition [[[
HOSTNAME=$(hostname)
NET_ADDR=$(hostname -I)
NET_ADDR=$(ip -oneline -4 addr | awk 'BEGIN { ORS = " " } !/^[0-9]*: ?lo|link\/ether/ {print $4}')
KERNEL_VER=$(uname -r)
UPTIME=$(uptime | sed 's/.*up ([^,]*), .*/1/')
CORE_NUMBER=$(grep -c "model name" /proc/cpuinfo)