0
I am encountered the following error while running this script:
line 7: [1: command not found
#!/bin/bash
#$ for counter in $(seq 1 255); do curl -X POST -H 'Content-Type: application/json' http://127.0.0.1:5000/api/echo-json -d '[{"id": "123", "name": "oi"}]'; done
for counter in $(seq 1 600)
do
if ["$counter" == 2]; then
echo oi
curl -X POST -H 'Content-Type: application/json' http://127.0.0.1:5000/api/echo-json -d '[{"id": "123", "name": '"$counter"'}]'
fi
curl -X POST -H 'Content-Type: application/json' http://127.0.0.1:5000/api/echo-json -d '[{"id": "123", "name":'"$counter"'}]'
sleep 1
done
sudo apt-get update
2)sudo apt-get install curl
– Augusto Vasques
I have already installed, I think the problem is in if, because echo hi ta not appearing tbm
– thg1
hi wouldn’t have to be in quotes?
– Benilson
I put it and it didn’t help
– thg1