channel_hopper() { local iface="${1}" while : ; do for i in $(seq 1 13); do sleep 1 echo switch to channel "${i}" iw dev "${iface}" set channel "${i}" done done } channel_hopper wlan0
Standard input is empty
switch to channel 1 switch to channel 2 switch to channel 3 switch to channel 4 switch to channel 5 switch to channel 6 switch to channel 7 switch to channel 8 switch to channel 9 switch to channel 10
./prog.sh: line 7: iw: command not found ./prog.sh: line 7: iw: command not found ./prog.sh: line 7: iw: command not found ./prog.sh: line 7: iw: command not found ./prog.sh: line 7: iw: command not found ./prog.sh: line 7: iw: command not found ./prog.sh: line 7: iw: command not found ./prog.sh: line 7: iw: command not found ./prog.sh: line 7: iw: command not found ./prog.sh: line 7: iw: command not found