 <p>Why not simply do one at a time?</p> <pre><code>#!/bin/bash echo "Importing URLs..." file=sizeurls.csv echo "Gathering page sizes..." while IFS= read -r url do phantomjs yslow.js --info basic --format plain $url | grep 'url\|size' done &lt; "$file" &gt; temp.txt echo "Formatting data..." sed -i -e 's/size://g' -e 's/url://g' temp.txt paste - - -d, &lt; temp.txt &gt; pagesize.csv echo "Done!" </code></pre>