linux terminal curl: option -: is unknown error
18,443
It looks like you have a space between the hyphen and the capital L. Try removing that; i.e.
- L
Becomes
-L
Author by
Admin
Updated on June 05, 2022Comments
-
Admin almost 2 years
I keep trying to run this code but i keep getting the error "curl: option -: is unknown" HERE IS THE CODE
#!/bin/bash #crawl End Clothing for Product IDs for i in $(eval echo {$1..$2}) do rm -f end-cookie.jar curl -c end-cookie.jar - L http://www.endclothing.com/checkout/cart/add/eunc/a,,/product/204726 -s -o /dev/null url=`curl -b end-cookie.jar -w "%{url_effective}\n" - L -s -S -o /dev/null http://www.endclothing.com/checkout/cart/add/uenc/a,,/product/$i` echo $i - $url done
and when i run that i get the error
akshayk17j@ubuntu:~$ /home/akshayk17j/Desktop/TheEnd.sh curl: option -: is unknown curl: try 'curl --help' or 'curl --manual' for more information curl: option -: is unknown curl: try 'curl --help' or 'curl --manual' for more information {..} -
HOW DO I FIX THIS? I dont know much about linux.
also i recieved this code in picture format and had to type it up. it also said "Usage: ./TheEnd.sh 1 500000" but idk what that means. thanks for your help
-
Alt-Cat over 2 yearsI had a similar whitespace typo. So was a useful answer for me. Thanks.