I have about 100 lists of URLs used for health checking (200, 300,400,500) but cannot figure out the terminology to ask the question. In advance, I apologize.
I want to use a list to choose on of the identified list files, containing the URLS, and then run curl against it to get my results. Currently, Im stumped.
If I call out the file implicitly, I can get things to work. If I use a select againt the listing of files to choose from, I can get that file and do a simple 'cat' of the result and get the URL's in it successfully.
I cannot seem to do the select, get the file into its variable and then make the next move to the loop to run thru those items in the chosen file successfully.
Im embarrased that its making a mess out of my hair.
works
select f in *.lst; do echo $f
done
Does not work in any way or format
select f in *.lst;
for i in (cat $f); do curl $i
done
bash -x ./test.sh
+ select f in '*.lst'
1) availability_health_check.lst 3) facility_service_health_check.lst
2) explorer_health_check.lst 4) mobile_service_health_check.lst
#? 1
+ echo availability_health_check.lst
availability_health_check.lst