view · edit · sidebar · attach · print · history

The while Loop

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

view · edit · sidebar · attach · print · history
Page last modified on February 26, 2013, at 12:10 PM