Tiny Core Linux

General TC => Programming & Scripting - Unofficial => Topic started by: Paulo on March 23, 2013, 07:18:12 PM

Title: Simple Battery Monitor script
Post by: Paulo on March 23, 2013, 07:18:12 PM
Hi all

Been using TC for about 2 weeks now and in that time not only have I learnt quite a bit about Linux
but also received lots of help from various forum members so now it's time to give something back.
I have written a simple five line script to monitor the battery level on a laptop which is now a permanent "feature" of my TC computer and hope it's of some use to others.

Title: Re: Simple Battery Monitor script
Post by: coreplayer2 on March 23, 2013, 08:10:43 PM
nice work thank you
Title: Re: Simple Battery Monitor script
Post by: Paulo on March 24, 2013, 07:35:24 AM
You're welcome.
Title: Re: Simple Battery Monitor script
Post by: pacchiee on May 15, 2013, 09:59:03 PM
Hi,

Am new to Linux and TC as well. Want to install this Battery Monitor script. When I try to run the .sh file from command prompt, I get the error:

./battmon.sh: line 27: bc: not found
./battmon.sh: line 28: bc: not found

I don't  know if am trying to install it the correct way. Here is how I run the battmon.sh file:

1. cd Desktop
2. chmod +x battmon.sh
3. sh ./battmon.sh

Please help. Thank you!
Title: Re: Simple Battery Monitor script
Post by: Rich on May 15, 2013, 10:02:18 PM
Hi pacchiee
You need to install  bc-1.06.94.tcz
Title: Re: Simple Battery Monitor script
Post by: pacchiee on May 15, 2013, 10:29:33 PM
Thank you Rich, for the quick help..

Installed bc-1.06.94.tcz and now battmon.sh runs and gives the battery status in command prompt. Nice tool.

However, meanwhile I found 'flit' and installed it. Works fine for me as I always can see a battery monitor on my desktop.

Thanks again! :)