title: Android/adb redirect console app output
body: <p>I am trying to get the output of a WLAN driver control interface via <code>adb shell</code> on a motorola droid 2.  The command is called wlan_cu.  To run the command,I am using: </p>
  
  <pre><code>% wlan_cu -itiwlan0 -s /data/jay/stat.sh
  </code></pre>
  
  <blockquote>
    <p>Connection established with supplicant .../Connection> Bssid_list,
    Connect, Disassociate, Status, Full_bssid_list, wPs/</p>
    
    <p>Status   : DISCONNECT <br/> MAC      : f8.7b.7a.7b.b7.9b <br/> SSID : <code>&lt;empty&gt;</code> 
    <br/> BSSID    : 00.00.00.00.00.00 <br/> 
    Channel  : <code>&lt;empty&gt;</code>
    <br/></p>
    
    <p>Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
    [1]   Segmentation fault      wlan_cu -itiwlan0 -s /data/jay/stat.sh</p>
  </blockquote>
  
  <p>The <code>-s</code> option is to read wlan_cu commands from a script.</p>
  
  <blockquote>
    <p>% cat /data/jay/stat.sh <br/> 
    c s <br/>
     / <br/> 
    q <br/></p>
  </blockquote>
  
  <p>If I try to redirect the output i.e.</p>
  
  <p><code>% wlan_cu -itiwlan0 -s /data/jay/stat.sh &amp;&gt; out.txt</code></p>
  
  <p><code>out.txt</code> is created, but empty and the output still goes to screen.  Anyone have an idea? been stuck on this for quite a while.</p>