blob: 84f84dcc168760ef6f5afadd65a8f41ad92c14b9 (
plain)
1
2
3
4
5
6
7
8
9
10
|
#!/usr/bin/env bash
internet=$(nmcli g | sed -n 2p | awk '{print $1}')
if [[ $internet == "connected" ]]
then
con=$(nmcli | grep "connected to" | sed "s/.*: connected to \(.*\)/\1/g")
echo "" $con
else
echo ""
fi
|