Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while read line
- do
- code=`echo $line | awk -F' ' '{print $1}'`;
- device=`echo $line | awk -F' ' '{print $2}'`;
- state=`echo $line | awk -F' ' '{print $3}'`;
- if [[ $code == $message ]]
- then
- echo "Translated: $device-$state";
- fi
- done <CODE-LIST.txt
- MQTT-CODE DEVICE STATE
- 1-1-32-16236607 RGB_LED ON
- 1-1-32-16203967 RGB_LED OFF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement