title: How to use stderr with execve
body: <p>I want to see only <code>football</code> in the stdout. And if instead of using echo I use a nonexistant command, then Id like it to be redirected to stderr. Im doubting if its doable.</p>
  <pre><code>int main(int argc, char *argv[]) {
          char *tab[] = {&quot;echo&quot;, &quot;football&quot;, &quot;2&gt; /dev/null&quot;, NULL};
  
          char test [strlen(&quot;echo&quot;) + strlen( &quot;/bin/&quot; ) +1];
          strcpy(test, &quot;/bin/&quot;);
          strcat(test, &quot;echo&quot;);
          execve(test, tab, NULL);
      
          return 0;
  }
  </code></pre>
  <p>I get <code>football 2&gt; /dev/null</code> but I want only to see <code>football</code>.</p>