Advertisement
Guest User

Monitor cargador conectado v2

a guest
Apr 13th, 2014
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.30 KB | None | 0 0
  1. while [ true ]; do
  2.    
  3.     salida=$(acpitool |grep off-line)
  4.     if [  -n "$salida" ]  &&   $bandera  ;
  5.     then
  6.         bandera=false
  7.         #echo "está off line"
  8.         zenity --info --text="La batería está off line"
  9.        
  10.     elif [ ! -n "$salida" ];
  11.     then
  12.    
  13.         bandera=true
  14.         #echo "está on line"
  15.     fi
  16.     sleep 30s
  17. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement