Using xargs and curl to request URLs from a list

Just some simple bash stuff that I keep forgetting

cat list-of-urls-without-hostnames.txt | xargs -i curl -v -L http://example.com{}

where “list-of-urls-without-hostnames.txt” contains a list of URL paths, like:

/resources/one
/resources/two

Leave a Reply

Your email address will not be published.