 <p>Your trick would work, if you would tell <code>tr</code>, what slash should be translated into:</p> <pre><code>for w in $(echo "what/the/heck" | tr "/" " ") ; do echo $w; done what the heck </code></pre>