Article 5KX7F Behavior of 'upower' program in a bash script

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?latest?d=yIl2AUoC8zA latest?i=p8EzNnRl8tA:vCqPFpAlDJQ:F7zBnMy latest?i=p8EzNnRl8tA:vCqPFpAlDJQ:V_sGLiP latest?d=qj6IDK7rITs latest?i=p8EzNnRl8tA:vCqPFpAlDJQ:gIN9vFwp8EzNnRl8tA
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments