Professional Documents
Culture Documents
Wifi
Wifi
Wifi
/bin/bash
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
interface=wlp8s0
if [ ! -z "$1" ]; then
interface=$1
fi
symbol=
ssid=$(iwgetid | sed -e "s/$interface\ \ \ \ ESSID:\"//" | sed -e "s/\"//")
ip_address=$(ifconfig wlp8s0 | grep "inet addr" | cut -d: -f2 | awk '{print $1}')
#------------------------------------------------------------------------
if [ -z "$ssid" ]; then
ssid=DOWN
fi