Click here to Skip to main content
15,888,315 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
here is a shell script which takes domain and its parameters to find status code . this runs way faster due to threading but misses lot of requests.



if i ran normally it process all requests but the speed is very low. is there a way through which speed is maintained and it also not misses all requests .

What I have tried:

while IFS= read -r url <&3; 
do while IFS= read -r uri <&4;
 do urlstatus=$(curl -o /dev/null --insecure --silent --head --write-out '%{http_code}' "${url}""${uri}" --max-time 5 ) && 
echo "$url $urlstatus $uri" >> urlstatus.txt & 
done 4<uri.txt
 done 3<url.txt
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900