Skip to content
Prev 172234 / 398506 Next

Bash script that uses an R command

I have wriiten (with the help of the internet) a bash scirpt for my
debian ppc 5.0 laptop to display battery remaining in a panel on the
xfce desktop environment.

echo `hal-device | grep battery.remaining_time | awk '{print $3/3600}' `-battery

and this nicely spits out  4.95 hours in the panel.  This is fine
except it is a snow day and I have some extra time on my hands.  I was
wondering if I could write a little program that would take 4.95 and
convert it into 4: (.95*6) in other words 4:57 in R and then use that
in a shell script to tweak the battery remaining script.  I am sure
there is a better way, but I am a noob to linux and have a couple of
years with R.
thanks