title: How can I negate the return-value of a process?
body: <p>I'm looking for a simple, but cross-platform <em>negate</em>-process that negates the value a process returns. It should map 0 to some value != 0 and any value != 0 to 0, i.e. the following command should return "yes, nonexistingpath doesn't exist":</p>
  
  <pre><code> ls nonexistingpath | negate &amp;&amp; echo "yes, nonexistingpath doesn't exist."
  </code></pre>
  
  <p>The ! - operator is great but unfortunately not shell-independent.</p>