From 77e901002381c3916a96b55cd3544c5ef88047c1 Mon Sep 17 00:00:00 2001 From: Jason Ritchie <35236484+jasonritchie06@users.noreply.github.com> Date: Thu, 29 May 2025 11:59:24 -0400 Subject: [PATCH] Update .bashrc Add support to correctly identify actual wlan interface name for whatsmyip function. Where wlan0 was hard coded we now try to identify actual device. On newer Ubuntu installs, the device is usually begins with wlp. If the iw command is not available, we fail back to hard coded wlan0. Also added a carriage return after the command to begin a new line. --- .bashrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index b0ca44a..8ab0aa5 100644 --- a/.bashrc +++ b/.bashrc @@ -674,7 +674,8 @@ function whatsmyip() { # External IP Lookup echo -n "External IP: " if command -v curl >/dev/null 2>&1; then - curl -4fsS --max-time 5 https://ifconfig.me || echo "unknown" + curl -4fsS --max-time 5 https://ifconfig.me || printf '%s' "unknown" + echo else echo "curl not installed" fi