<p><pre><code>    echo 0 &gt; foo &#x2F;&#x2F;wont work with sudo ..
    sudo echo 0 &gt; foo &#x2F;&#x2F;will fail ... 
    sudo sh -c &#x27;echo 0 &gt; file&#x27; &#x2F;&#x2F;If you want echo with sudo
</code></pre>
else what author has done is right