We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26c2d38 commit cb51befCopy full SHA for cb51bef
1 file changed
scripts/getvoltage.sh
@@ -3,5 +3,5 @@
3
command -v socat >/dev/null 2>&1 || { echo >&2 "I require socat but it's not installed. Aborting."; exit 1; }
4
5
RESPONSE=`echo '{"command":"read_voltage"}' | socat -,ignoreeof ~/src/openaps-menu/socket-server.sock | sed -n 's/.*"response":\([^}]*\)}/\1/p'`
6
-echo $RESPONSE
+[[ $RESPONSE = *[![:space:]]* ]] && echo $RESPONSE
7
#./getvoltage.sh | sed -n 's/.*"response":\([^}]*\)}/\1/p'
0 commit comments