The bash program below is a (test) program to test the values of a USB
interface card.
The lines in front are only for clarification.
When an input port on the USB card gets activated, then the variable
digital_inputs changes (in line 11).
I checked that with line 12
The next time the while statement executes (in line 8) it should be false,
and the while loop should stop.
This doesn't happen.
What is my mistake? (don't get a syntax error)
1#!/bin/bash
2
3 digital_inputs=0
4 portstatus_dec=0
5
6
7
8 while [ $digital_inputs=$portstatus_dec ];
9 do
10 sleep 1
11 digital_inputs=`k8055 -m:1 2>/dev/null | tail -1 | cut -d';' -f2`
12 echo $digital_inputs
13 done
14
15 echo "There is an alarm"