Behavior of 'upower' program in a bash script
by notadoc from LinuxQuestions.org on (#5KX7F)
Run from a command line, 'upower > power.log' puts the output in the named log file, as expected. But...the same command in a bash script produces no output file, and return "1", not "0".
Second odd behavior: 'upower' w/o any path qualifier works, but '/usr/bin/upower' fails and returns "1".
Main question: how can I get the upower command to work in a bash script? And why does the fully qualified command fail?


Second odd behavior: 'upower' w/o any path qualifier works, but '/usr/bin/upower' fails and returns "1".
Main question: how can I get the upower command to work in a bash script? And why does the fully qualified command fail?