You are not logged in.
Friends:
I currently use the wifi-menu command and select my ssid each time and it works well.
However I prefer to put it an a script that I can run so it selects "myssid" from the command line and does not require my intervention.
What is the command to do that from command line ?
-N
Offline
You want the script to stop and ask which ssid to use? I am not a bash genius, but can I suggest a different way?
Use an variable within the script, say myssid. Assuming the script is called thescriptname and the access point is called theSsidName; then, invoke the script as thus:
myssid=theSsidName thescriptnameLast edited by ewaller (2012-12-28 18:30:55)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
I may be misunderstanding (as I'm reading this differently from ewaller) but it sounds like you are looking for the following:
iwconfig wlan0 essid myessidNote that wlan0 must be your interface (perhaps eth0 or something else). Also myessid is the essid you wish to connect to. This only works for "open" or unsecured networks. For secure networks you'd use wpa_supplicant.
You could also use a tool like netcfg, in which case you'd use a command something like "netcfg MYPROFILE" where MYPROFILE is a profile you've created. Finally, if you keep an eye on the community contribution section, I'll be posting my vastly revamped wifi connection tool in a day or two (or get a preview in my "wifi2" repo on github).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline