dtmenges@... via groups.io <dtmenges@...> wrote:
rigctl -m 3073 -r /dev/ttyUSB1 -s 115200 get_powerstat
will return a "1" if the power is on. What I'm having trouble with is putting that in a bash .sh file and then capturing that output. It is all part of a bigger project.
As you may surmise, I know just enough about Bash to be dangerous.
Try:
powerstat=$(rigctl -m 3073 -r /dev/ttyUSB1 -s 115200 get_powerstat)
if [ "$powerstat" = "1" ]; then
echo Power is on
else
echo Power is off
fi