{bash,zsh}rc: add quick hack for ifconfig IPv4 addresses

This commit is contained in:
Aminda Suomalainen 2025-05-08 10:03:47 +03:00
parent f6e4de3aa0
commit b1094e8492
Signed by: Mikaela
GPG Key ID: 99392F62BAE30723
2 changed files with 10 additions and 0 deletions

View File

@ -145,6 +145,11 @@ if hash lsb_release 2> /dev/null; then
elif hash hostnamectl 2> /dev/null; then
hostnamectl hostname &
fi
if hash ifconfig 2> /dev/null; then
\LC_ALL=C.utf8 \ifconfig | \grep inet | \grep -Ev "127.0.0.1|inet6"
fi
printf "\n"
printf "$(uptime --pretty)\t$(uptime)\n"
printf "\nPresent:\n"

View File

@ -42,6 +42,11 @@ if hash lsb_release 2> /dev/null; then
elif hash hostnamectl 2> /dev/null; then
hostnamectl hostname &
fi
if hash ifconfig 2> /dev/null; then
LC_ALL=C.utf8 \ifconfig | \grep inet | \grep -Ev "127.0.0.1|inet6"
fi
printf "\n"
printf "$(uptime --pretty)\t$(uptime)\n"
printf "\nPresent:\n"