Trying curl a list of urls to confirm they are active or not. I'd like to separate active from non-active but I'm stuck. I'm super new to bash scripting, as I'm sure you can tell. cat function into the url doesn't appear to work correctly. Separating the contents also doesn't work correctly. A large potion of the urls will go into nv.txt but I know they are active urls.
Thank you for the help in advance
#!/bin/bash
url=$(cat non-ssl-list2.txt)
if curl --output /dev/null --silent --head --fail "$url"
then
echo $url Exists > v.txt
else
echo "$url Does Not Exist" > nv.txt
fi
https://hastebin.com/tuqekocate.bash
(code kept getting chopped off so I put it into hastebin).
https://hastebin.com/nogasiyeyo.css (sample of list)