commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
The original proc file doesn't exist on my system.
There are 10 alternatives - vote for the best!
In my case it was actually like this...
This prints "Charging" or "Discharging". Obviously, this will indicate the status of the AC adapter. The awk part could be from 1-6. I removed the comma because it is useless when only looking at one element of the output array. See acpi(1) for more info.
With progress bar.. hahaa this is friggin' kludge
If you can do better, submit your command here.
You must be signed in to comment.