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)
|
||||
SSID=$(iw dev | sed -nr 's/^\t\tssid (.*)/\1/p')
|
||||
if [ -n "$SSID" ]; then
|
||||
echo -- "$SSID"
|
||||
printf '%s' "$SSID"
|
||||
else
|
||||
echo 'Ethernet'
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue