title: Send string to stdin in bash script
body: <p>I want my bash script to write a string to standard input stream. I want it to pass my password to <code>git push</code> command. I've tried the three following options and neither of them worked: git was asking me for the password.</p>
  
  <pre><code>#!/bin/bash
  
  # 0
  git push origin master &lt;&lt;&lt; 'password'
  
  # 1
  echo 'password' | git push origin master
  
  # 2
  git push origin master &lt;&lt;EOF
  password
  EOF
  </code></pre>