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