How to check if power cable is connected from the command line?
- by D Connors
Hi, I'm running ubuntu on my notebook and I need a way to check (from the command line) if the power cable is connected. Is there any system file that keeps log of this? or is there a bash command that will help me?
I need this for a script that will behave differently depending on whether the power cord is plugged in or not.