title: How to print gcc runtime error to text file?
body: <p>I'm trying to make a program. That's printing error from C code through gcc compiler.
  When Compile error happens, it makes text file which has error messages in. But when runtime error happens. For example, 'segmentation fault'. The file is empty. 
  It shows segmentation fault well on terminal, but it doesn't show the errors in the file. </p>
  
  <p>I tried to type below few commands but it still doesn't work. </p>
  
  <pre><code>gcc new.c &amp;&gt; myFile
  gcc new.c &gt; myFile 2&gt;&amp;1
  </code></pre>