wpa_li在SSID中添加具有空间的网络



我正试图使用wpa_cli添加一个网络,该网络的SSID包含一个使用.sh bash文件的空间:

wpa_cli set_network 0 ssid "SSID 123"

"并没有帮助——wpa_cli仍然将空间解释为两个参数的分隔符。

看起来您混合了转义引号和转义空格。

如果参数(文件名或ssid)中有空格,可以通过两种方式转义空格:

  1. 使用"或"

    cp "file with spaces" "path with spaces/sub dir"
    cp 'file with spaces' 'path with spaces/sub dir'
    

    注意," "' '之间存在差异。如果使用' ',则不会展开变量。

  2. 用反斜杠转义空格()。

    cp file with spaces path with spaces/sub dir
    

最新更新