Thanks ladoga. This gives the result I need, but I would like it in a script without saving the result in a file. I tried: (bmestat | grep "battery current") This gave me: battery current: -213 I had the phone charging at the time. How do I now extract just the result (-213)? Thanks