Thread
:
N9 idle current drain
View Single Post
fhutt
2013-11-14 , 04:28
Posts: 49 | Thanked: 8 times | Joined on Oct 2013
#
8
Maybe this line:
current = ((bmestat | grep "battery current") | awk '{print $3}' )
is too complicated for someone like me, who knows very little about sh or python.
But maybe split the job up into 3 smaller pieces would be easier:
#!/bin/sh
#Place the output of bmestat into string bmestring
bmestring = bmestat
#Extract the 'battery current' element out of the string in bmestring
element = ($bmestring | grep "battery current")
#Extract the numeric value out of element
current = ($element | awk '{prit $3}')
echo -n $current
Now you can see my lack of knowledge.
Maybe it would be easier in python.
Can someone please help put me out of my misery with this?
Thanks
Quote & Reply
|
fhutt
View Public Profile
Send a private message to fhutt
Find all posts by fhutt