New answers tagged

0

Solved using for/if/break. #!/bin/bash URL_prefix='http://example.com/filename_' URL_var_range_start=1 URL_var_range_stop=10000 URL_var_range_zero_padding=5 URL_sufix='.ts' echo "Creating videos folder..." mkdir videos && cd "$_" echo "Creating video folder..." mkdir video && cd "$_" echo "...


0

This is my current attempt: #!/bin/bash while read LINE; do curl -o /dev/null --silent --head --write-out "%{http_code} $LINE\n" "$LINE" done < list.txt I run it using: ./bash.sh > output.txt Then, I run grep "403" output.txt after it's completed to see a list. I'm not sure this is the most efficient. Would love some ...


0

You can use the Windows version of jq to format the output of json. I usually rename the downloaded executable to just jq.exe and put it in my c:\Windows\System32 directory so it can be used anywhere. To use, simply pipe the output of curl into it like so: curl "http://www.documentcloud.org/api/search.json?q=group:nytimes" | jq


0

Please use a JSON parser like xidel which pretty-prints by default. $raw for raw output (like curl) and $json to parse (and prettify) the output as JSON.


0

You can also use AWK to print the first line of the output Example: $ curl -skI -XGET 'http://example.com' | awk 'NR==1' HTTP/1.1 200 OK


1

Taking an educated guess here since I don't use IIS Express, but it looks like from this SO question that the default for IIS Express is to bind to localhost only. Since you need to access it from another "computer" (the virtualized WSL2 instance), you'll need it to listen on all addresses. In most software, this would be done by binding to 0.0.0....


Top 50 recent answers are included