I would like to visit this api via a shellscript.
This is what i came up with:
Code: Select all
#!/bin/bash
VAR1=$(curl -v "http://192.168.1.9:8084/json.htm?type=command¶m=switchLight&idx=3&switchcmd=On");
echo $VAR1;
exit 0
When i run the curl command from the commandline (without the VAR1 parameter), everything is working fine..
Could somebody pleasy help me, i have been searching for hours and i cant find the solution.
I think it has something to do with the variables in the URL (e.g. &idx=3)