I have a script on a linux server which connects to a URL refines the data and returns a text file with multiple links, please see below:
Script:
#!/bin/bash
/usr/bin/curl -k -s URL | cut --characters=44-51 | sort --unique | sed -n -E 's|^AP(.+)$|http://ap\1.ztb.icb.commerzbank.com:1025/|p' >> testOutput.txt
Output:
http://APrandomnumber.com:1025/
http://APrandomnumber.com:1025/
http://APrandomnumber.com:1025/
http://APrandomnumber.com:1025/
http://APrandomnumber.com:1025/
http://APrandomnumber.com:1025/
http://APrandomnumber.com:1025/
I want to now be able to curl each of these URL's from the text file generated by the script and return a true or false depending on whether it was able to connect to them or not.