Reputation: 707
I bought an RFID USB kit and haven't been able to read the RFID IDs with the following Bash script.
#!/bin/bash
while [ read -r rfid ] ; do
#URL=http://www.mainpage.us/rfid/status.php?number=$rfid
#curl --request POST $URL
echo $rfid
sleep 1
done < /dev/cu.usbserial-A600JNHR
The RFID should work fine as per the terminal. What am I doing wrong?
Upvotes: 0
Views: 1074
Reputation: 798744
[
is a command. Since you want to use read
, you should not try to use [
.
Upvotes: 1