You are not logged in.
I need to use spaces in the ESSID variable in one of my network profiles. The ESSID is "Telenor Mobil WLAN", which is a public wireless IP zone (which you have to pay for though). If I add ESSID="Telenor Mobil WLAN" it just complaines about "Mobil" not being a valid command...
How can I escape the spaces in this ESSID?
Offline
Nested quotes should work:
ESSID=" 'My E S S I D' "
Offline
Nested quotes should work:
ESSID=" 'My E S S I D' "
Will try that
Offline
You can also use backslashes:
ESSID="My E S S I D"
Not quite as nice looking, but just as effective.
Bostoniman
Ba-zing Communications
Offline
I realize that this is an old thread, but I'm having a similar problem. Not only does the essid have a space in it, it also has a quote!
I get
iwcfg="eth1 essid 'Girls' Room' key AB:CD:EF:AB:CD:EF:AB:CD:EF:AB:CD:EF:AB channel 11" && sudo iwconfig $iwcfg
Error : unrecognised wireless request "Room'"
I also tried "Girls' Room" and Girls' Room but I get the same error.
I am trying to do this from /etc/conf.d/wireless like
wlan_eth1="eth1 essid "Girls' Room" key AB:CD:EF:AB:CD:EF:AB:CD:EF:AB:CD:EF:AB channel 11"
I did try /etc/rc.d/netword restart and all that, it works the same as the shortcut above.
Help from someone who understands bash better than myself? Thanks
UPDATE:
Seemingly the only way i can get this to work is to replace
/usr/sbin/iwconfig $iwcfg
with
sh -c "/usr/sbin/iwconfig $iwcfg"
in /etc/rc.d/network
the problem seems to be that, when a variable is referenced, if it contains multuple words, they are broken up each individually as different arguments when passed to iwconfig. in order to get the quotes to work, it is necessary to get bash to reread the line and not ignore the quotes. i'm sure there is a way to get around this.
Offline
Bump. After almost five years I am having the same problem as wiremore. No amount of shell quoting \ escaping seems to fix it. My only choice is to edit the rc.d script too.
6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.
Offline
Use "ifconfig -a" or "iwconfig" command to find your wireless interface.Mine is "wlan0" your card might be different
iwconfig wlan0 essid "Girls' Room" key ABCDEFABCDEFABCDEFABCDEFAB
change "wlan0" to what ever your card is.You should also take a look at https://wiki.archlinux.org/index.php/Wireless_Setup
or https://wiki.archlinux.org/index.php/Wi … management
Last edited by unilx (2011-02-26 00:56:32)
Offline