while read -r line; do eval "wget $line" done < file
or
#/bin/bash while read -r line; do eval "curl http://freegeoip.net/csv/$line" done < ip.txt
from here: http://superuser.com/questions/389485/executing-lines-of-a-file-with-xargs-using-stdout-redirection