# Open your editor (I always choose vi) type:
#!/bin/bash# Don't forget to replace "C1AC" with your own battery type
cat /proc/acpi/battery/C1AC/state | grep "present voltage"
cat /proc/acpi/battery/C1AC/state | grep "present rate"
# Save these shell script, for example, myfile.sh
# Change the mode of file so that it can be executed
chmod +x myfile.sh# Run this script by typing this instruction in your Terminal:
./myfile.sh# The output will look like this:
present voltage: 16778 mVShell script will simplify our life. Believe me and enjoy!
present rate: 702 mA