title: tee command not working as expected (with read and echo)
body: <p>Script and output is as below :</p>
  
  <p>Script :</p>
  
  <pre><code>#!/bin/bash
  #tee_with_read.sh
  function tee_test()
  {
      echo "***This should be printed first but it is not***"
      read -r -p "Enter input : "
      echo "You entered : $REPLY"
  }
  tee_test | tee -a logfile
  </code></pre>
  
  <p>Output :</p>
  
  <pre><code>$ ./tee_with_read.sh
  Enter input : ***This should be printed first, but it is not***
  "My Input"
  You entered : "My Input"
  </code></pre>
  
  <p>I'm trying to append output to logfile.
  But as you can see in ouput, it seems like first read gets excuted and then echo which is not as expected.</p>
  
  <p>I'm using Git Bash  Version 3.1.23 on windows 10.
  Since named pipe is not available in this version, I cannot use named pipe for logging purpose.</p>