in reply to Laptop Battery Percentage

If the charge is at 100% you are only picking up the last two zeros.

Simple would be:

#!/usr/bin/perl print 'Battery: ', ( `acpi` =~ /(\d+)%/ )[ 0 ] // '??';

Replies are listed 'Best First'.
Re^2: Laptop Battery Percentage
by naildownx (Beadle) on Aug 01, 2011 at 12:48 UTC
    I will have to try that out when I get to my laptop tonight :) Thanks for the reply.
    Silence is golden, but Duct Tape is silver x)
Re^2: Laptop Battery Percentage
by naildownx (Beadle) on Aug 07, 2011 at 04:14 UTC
    I actually liked this reply the best, and it works very good...going to EDIT it now. Thanks for the help jwkrahn
    U-U-D-D-L-R-L-R-A-B->START