title: grep the adb logcat & write the output to a text file
body: <p>I want to grep the adb logcat &amp; write the output to a text file.
  If I just do </p>
  
  <pre><code>./adb logcat &gt; std.txt
  </code></pre>
  
  <p>it writes the entire log to the text file &amp; If I do </p>
  
  <pre><code>./adb logcat | grep ABC
  </code></pre>
  
  <p>it prints all lines containing ABC to my terminal. But now I wish to search for ABC &amp; write only these lines to a text file.</p>
  
  <pre><code>./adb logcat | grep ABC &gt; std.txt
  </code></pre>
  
  <p>doesn't work. Plz help.</p>