Skip to content

Instantly share code, notes, and snippets.

@lancelakey
Created November 3, 2011 05:24
Show Gist options
  • Save lancelakey/1335833 to your computer and use it in GitHub Desktop.
Save lancelakey/1335833 to your computer and use it in GitHub Desktop.
Read a bunch of urls from a file, curl them all, echo the results
#!/usr/bin/env bash
#
# Script to read a bunch of urls from a file, curl them all, echo the results
# The original purpose of this script was to test a bunch of 302 redirects
TARGETS=`cat targets`
for i in $TARGETS
do
echo "Testing $i"
RESULT=`curl -s -L $i`
echo $RESULT
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment