这是我正在运行的shell代码:
#!bin/bash
while true
do
req=$(curl http://localhost/devcalls/camerarequest.php)
if [ "$req" == "1" ]
then
sudo bash /home/ckoy-admin/HAS_system/camera/cam.sh
fi
done
这是我执行时遇到的错误:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1 100 1 0 0 56 0 --:--:-- --:--:-- --:--:-- 58
CAM.sh: 7: [: 1: unexpected operator
请告诉我这里有什么问题。