 <p>First, replace <code>cat $strLocalDir"config.txt"</code> by <code>cat "${strLocalDir}config.txt"</code>.</p> <p>Then, check what does config.txt contains ? This will be moved to the $URLS variable, maybe it s not well formed.</p> <p>When you have such problems try to insert debug statements, like print. Test the value of your variables each time they're needed, you'll know more precisely where does the code fail.</p>