Use of "printf" command to avoid shell interpretation of dashes ("-") or percent sign ("%")
This commit is contained in:
parent
131bcdae10
commit
ec2739e9ba
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ get_ssid()
|
||||||
Linux)
|
Linux)
|
||||||
SSID=$(iw dev | sed -nr 's/^\t\tssid (.*)/\1/p')
|
SSID=$(iw dev | sed -nr 's/^\t\tssid (.*)/\1/p')
|
||||||
if [ -n "$SSID" ]; then
|
if [ -n "$SSID" ]; then
|
||||||
echo -- "$SSID"
|
printf '%s' "$SSID"
|
||||||
else
|
else
|
||||||
echo 'Ethernet'
|
echo 'Ethernet'
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue