I have a file containing the URL of websites. I am trying to write a bash script that will take any file containing URL and write to another file - the URL and the related status code.
What I am trying to achieve, is here :
I have URL in a file as:
http://google.com http://trafficinviter.com http://stackoverflow.com ............ ............ Upto 30 crore lines of URL in a file.
I am using the
cURL command to get the Http Status of these URLs.
Hence, I am not understanding how I can get the URL and the corresponding HTTP status of that URL.
Say I need to have the output in a file like this:
http://google.com 200 ok http://trafficinviter.com 200 ok http://stackoverflow.com 200 ok http://example.com 404 ............ ............ Upto 30 crore lines of URL in a file.
Also I am looking for a bash that makes my work done in a jiffy and easily. Because there are many lines, I am not able to find a proper solution for this. Kindly, help me. Thank you very much.