to construct arguments from input and invoke other utility
http://www.cyberciti.biz/faq/linux-unix-bsd-xargs-construct-argument-lists-utility/
$ echo 1 2 3 4 | xargs echo
$ echo 1 2 3 4 | xargs -n 2
$ find . -name "*.bak" -print0 | xargs -0 -I {} mv {} ~/old.files
cat a.txt | xargs -I % sh -c 'command1; command2; ...'
Or
< a.txt xargs -I % sh -c 'command1; command2; ...'
But maybe it's better to use while read