View Single Post
Posts: 701 | Thanked: 585 times | Joined on Sep 2010 @ London, England
#366
Originally Posted by vi_ View Post
My crumby scripting skills aside, what is a better/safer way of retreiving the temperature value and formatting it for use in a script/DCEW?
I don't know about better but the echo and command substitution are redundant (try removing them). To save on the cat you can use input redirection, try:
Code:
awk '{ print $1/10}' </sys/class/power_supply/bq27200-0/temp
 

The Following 10 Users Say Thank You to retsaw For This Useful Post: