mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2025-06-14 11:07:20 +02:00
{bash,zsh}rc: add quick hack for ifconfig IPv4 addresses
This commit is contained in:
parent
f6e4de3aa0
commit
b1094e8492
@ -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"
|
||||
|
5
rc/zshrc
5
rc/zshrc
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user