From 7e15a6f7b128217c20e372c08777f5431ced1c8e Mon Sep 17 00:00:00 2001 From: frosty Date: Mon, 9 Sep 2024 22:02:40 -0400 Subject: [PATCH] fix mod-network formatting --- .local/bin/mod-network | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.local/bin/mod-network b/.local/bin/mod-network index 5ce77cb..12ad1c8 100755 --- a/.local/bin/mod-network +++ b/.local/bin/mod-network @@ -2,9 +2,9 @@ set -eu -if address="$(ip route get 1 2>/dev/null)"; then - address="${address#* via * dev * src }" - address="${address% uid *}" +if address=$(ip route get 1 2>/dev/null); then + address=${address#* via * dev * src } + address=${address% uid *} fi if [ -n "$address" ]; then