Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. while read line
  2. do
  3. code=`echo $line | awk -F' ' '{print $1}'`;
  4. device=`echo $line | awk -F' ' '{print $2}'`;
  5. state=`echo $line | awk -F' ' '{print $3}'`;
  6. if [[ $code == $message ]]
  7. then
  8. echo "Translated: $device-$state";
  9. fi
  10. done <CODE-LIST.txt
  11.  
  12. MQTT-CODE DEVICE STATE
  13. 1-1-32-16236607 RGB_LED ON
  14. 1-1-32-16203967 RGB_LED OFF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement