N
N
Nikolai2018-11-28 19:17:32
linux
Nikolai, 2018-11-28 19:17:32

How to iterate through a list of links with cURL?

There is this code:

#!/bin/bash
while IFS= read -r url <&3; do
    urlstatus=$(curl -o /dev/null --insecure --silent --head --write-out '%{http_code}' "${url}" --max-time 10 ) &&
    echo "$url  $urlstatus" 
done 3<url.txt

The script goes through the list of links.
In the process, I even managed to cut:
cat url.txt | parallel curl -o /dev/null --insecure --head --write-out --max-time 10

Is it possible to force cURL to follow HTTPS links?
I tried to substitute the argument -k , unfortunately, the result was not given.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2018-11-28
@brame

kurl walks fine on https.
instead of useless text, they would better describe the errors that occur.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question