title: passing password to curl on command line
body: <p>I have a requirement where I am trying to write a shell script which is calling curl command internally. I have the password, username and url stored as variables in the script. However, since I want to avoid using user:password format of curl command in the script, I am just using curl --user   command. My intention is to pass the password through stdin. So, I am trying something like this -</p>
  
  <pre><code>#!/bin/bash
  user="abcuser"
  pass="trialrun"
  url="https://xyz.abc.com"
  curl --user $user $url 2&gt;&amp;1 &lt;&lt;EOF
  $pass
  EOF
  </code></pre>
  
  <p>But this is not working. I know there are variations to this question being asked, but I didn't quite get the exact answer, hence posting this question.</p>