(Scripts|SystemD)~lower size of scripts

This commit is contained in:
2024-05-31 20:52:53 +05:30
parent 9ef78de263
commit d2e7060f89
4 changed files with 8 additions and 11 deletions

View File

@@ -3,8 +3,11 @@
internet=$(nmcli g | sed -n 2p | awk '{print $1}')
if [[ $internet == "connected" ]]
then
con=$(nmcli | grep "connected to" | sed 's/.*: connected to \(.*\)/\1/g')
con=$(nmcli | grep "connected to" | sed "s/.*: connected to \(.*\)/\1/g")
echo "" $con
elif [[ $internet == "disconnected" ]]
then
echo ""
else
echo " Not Connected"
fi