updated sub-view's to use 'com/read'

This commit is contained in:
xdrm-brackets 2018-01-31 07:28:41 +01:00
parent b01daab1c1
commit 65c6543bf1
2 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ LED="0"; Rx=(0 0 0); # led; relays
while sleep 1; clear; do
# (3) Get last value from lines beginning by 'GSTA' #
STATE="`cat $BUF_IN | grep -Po "^GPIO(.+)$" | sed 's/^GPIO\(....\)$/\1/g' | tail -n1`";
STATE="`$ROOT/com/read gpio | grep -Po "^GPIO(.+)$" | sed 's/^GPIO\(....\)$/\1/g' | tail -n1`";
echo "state: $STATE";
@ -43,4 +43,4 @@ while sleep 1; clear; do
echo -n "R2: "; $ROOT/src/disp-relay ${Rx[2]};
echo -n "R3: "; $ROOT/src/disp-relay ${Rx[3]};
done;
done;

View File

@ -21,7 +21,7 @@ declare -A SERV;
while sleep 1; clear; do
# (4) Get last value from lines beginning by 'GSTA' #
SERV_LIST="`cat $BUF_IN | grep -Po "^SYSD(.+)$" | sed 's/^SYSD\(.\+\)$/\1/g' | tail -n20`";
SERV_LIST="`$ROOT/com/read systemd | grep -Po "^SYSD(.+)$" | sed 's/^SYSD\(.\+\)$/\1/g' | tail -n20`";
# (5) Store each service #
while IFS= read -r line; do