Answer the question
In order to leave comments, you need to log in
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
cat url.txt | parallel curl -o /dev/null --insecure --head --write-out --max-time 10
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question