Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • networks=$(iwlist wlan0 scan | grep ESSID | sed -r 's/(ESSID:|")//g'). networks is my array Commented Nov 28, 2014 at 10:24
  • What shell do you use? Commented Nov 28, 2014 at 10:26
  • I'm using bash. y? Commented Nov 28, 2014 at 10:27
  • @linux_inside networks=$(iwlist …) sets networks to a scalar value, which is the output of the command. If you want the output to be split, you need to make the variable an array: networks=($(iwlist …)). Commented Nov 29, 2014 at 20:48