ref: 329ac13da6171fe4073cbe02f3fef949e74ad18f
dir: /wifire/
#!/bin/rc rfork e argv0=$0 fn usage { echo usage: $argv0 '[ ethern ]' >[1=2] exit usage } b=() d=() fn ssid { cat $d/ifstats | sed -n 's/.* +[0-1][0-9] //p' | grep . | fm -p } if(! ~ $#* 1) usage ether=`{echo $1 | sed 's/ether//'} b=`{echo $ether | sed 's/^/#l/'} d=/net/ether$ether bind -a $b /net id=`{ssid} if(~ $#id 0){ echo No selection made exit } aux/wpa -s $id $d ip/ipconfig ether $d grep associated $d/ifstats