Skip to content

Instantly share code, notes, and snippets.

@ivanhuay
Created July 6, 2016 13:36
Show Gist options
  • Save ivanhuay/ff7198a2cd1f6cd35a9be8cee297b15d to your computer and use it in GitHub Desktop.
Save ivanhuay/ff7198a2cd1f6cd35a9be8cee297b15d to your computer and use it in GitHub Desktop.
bash script for execute curl to each file line
#!/bin/bash
FILE=$1
if [ -f $FILE ];
then
while read line
do
resp=`curl -s $line`
echo "$line $resp"
done <"$FILE"
else
echo "File $FILE does not exist."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment