I have a simple bash script below that outputs into a file threat info from the domain 1605158521.rsc.cdn77.org
. The domain is read from B1Dossier.
#!/bin/bash
baseurl=https://csp.infoblox.com
B1Dossier=/tide/api/data/threats/state/host?host=1605158521.rsc.cdn77.org
APIKey=<REDACTED>
AUTH="Authorization: Token $APIKey"
curl -H "$AUTH" -X GET ${baseurl}${B1Dossier} > /tmp/result
This time, I want the script to get information from multiple domains. For example, I have a file (domfile) with the following domains with each being on a new line:
cdn.js7k.com
example.org
www.hdcctvddns.com
How can I turn my script to execute on each domain from a file (domfle)?