Skip to content

Commit

Permalink
Improve iwlist command usage
Browse files Browse the repository at this point in the history
  • Loading branch information
roleoroleo committed Mar 29, 2024
1 parent 398f742 commit 2695a7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/www/httpd/cgi-bin/wifi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if [ $ACTION == "scan" ]; then
printf "Content-type: application/json\r\n\r\n"
printf "{\"wifi\":[\n"

LIST=`iwlist wlan0 scan | grep "ESSID:" | cut -d : -f 2,3,4,5,6,7,8 | grep -v -e '^$'`
LIST=`iwlist wlan0 scan | grep "ESSID:" | sed 's/^[ \t]*ESSID://g' | grep -v -e '^$'`

IFS="\""
for l in $LIST; do
Expand Down

0 comments on commit 2695a7c

Please sign in to comment.