title: Set the size of stdout buffer in shell script on mac osx
body: <p>I am running instruments on mac, and I want to redirect the output to a file. </p>
  
  <p>The following is the command I am using:</p>
  
  <pre><code>instruments -t "$AUTOMATION_TEMPLATE" "${APP_UNDER_TEST}" -e UIASCRIPT "AppTests/Automation/iPhone/MemLeaksTest.js" &gt;&gt; ${INSTRUMENTS_LOG_FILE}
  </code></pre>
  
  <p>Now, when I tail the ${INSTRUMENTS_LOG_FILE}, I can see that the last part of logs is delayed till the application on the simulator closes.
  i.e when instruments exit, only then the logs are being put in the log file.</p>
  
  <p>I want to force the redirect to have a buffer size of 0, i.e immediately log into the file.</p>
  
  <p>How can I do this?</p>
  
  <p>Thanks</p>