#===================================== #ups_status.sh | #Version 1.0 | #Written by pocketjawa yo | #http://twitter.com/pocketjawa | #Do what you want (with this script) | #'Cause a pirate is free | #YOU ARE A PIRATE | #===================================== #!/bin/sh -u # UTF-8 (international) script header PATH=/bin:/usr/bin ; export PATH # add /sbin and /usr/sbin if needed umask 022 # use 077 for secure scripts unset LC_ALL # unset the over-ride variable /sbin/apcaccess |egrep '^DATE|HOSTNAME|MODEL|STATUS|LOADPCT|BCHARGE|TIMELEFT' >/tmp/ups_status.txt