#!/bin/bash
chkroot && [[ $? = 0 ]] || exit 1
count=0
while [[ $count < 10 ]]; do
iwlist wlan0 scan | grep $1
[[ $? = 0 ]] && exit 0
let count=$count+1
sleep 2
done
echo "No ESSID's matching term '$1' found."
exit 1
chkroot && [[ $? = 0 ]] || exit 1
count=0
while [[ $count < 10 ]]; do
iwlist wlan0 scan | grep $1
[[ $? = 0 ]] && exit 0
let count=$count+1
sleep 2
done
echo "No ESSID's matching term '$1' found."
exit 1
No comments:
Post a Comment