From 9b0aa379d79d6b5c20f0355ea2f1c51999edb14a Mon Sep 17 00:00:00 2001 From: fro Date: Sat, 1 Nov 2025 19:35:11 -0500 Subject: [PATCH] / + hostip --- dots/bash/.bashrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dots/bash/.bashrc b/dots/bash/.bashrc index 2d64630..8e8e939 100644 --- a/dots/bash/.bashrc +++ b/dots/bash/.bashrc @@ -104,6 +104,11 @@ alias tdt="printf '\x1b]10;#00ffff\x1b\\'; printf '\x1b]11;#161021\x1b\\';" # td # networking # --- +# https://serverfault.com/questions/170706/easy-way-to-get-ip-address-from-hostname-using-a-unix-shell +function hostip() { + python -c "import sys, socket; print (socket.gethostbyname('$1'))" +} + nmrestart() { systemctl restart NetworkManager systemctl status NetworkManager