Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo -n "Nombre de la tarjeta de red: "
- read tarjeta
- while [ 1 ]
- do
- fecha=$(date +"%d/%B - %H:%M:%S")
- uptime=$(uptime | cut -d ',' -f 1 | grep -o 'up.*')
- essid=$(/sbin/iwgetid $tarjeta -r)
- AP="`/sbin/iwgetid --raw --ap | cut -c1-8`"
- SENAL="`/sbin/iwconfig 2> /dev/null | sed -n "/${tarjeta}/{n;n;n;n;n;p;}" | awk -F'=' '{printf $NF}' | sed 's/\s//g'`"
- essiddatos=$(/sbin/iwconfig $tarjeta 2> /dev/null | sed -E '/Bit Rate/!d;s/ //g;s/BitRate=(.*)Tx-Power=(.*)dBm/\2dBm BitRate:\1/g')
- BITR="`/sbin/iwconfig 2> /dev/null | sed -n "/${tarjeta}/{n;n;p;}" | sed -E 's/^[^=]+=([.0-9]+)\s.*/\1Mb\/s/'`"
- xsetroot -name "[ESSID:$essid $SENAL $AP $BITR ] {$fecha} [$uptime] $(id -un)@$(hostname)"
- sleep 5s
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement