title: Grab curl output's cookie in bash script
body: <p>When I send a curl command in my bash shell script I get output as follows</p>
  
  <pre><code>&lt; Date: Fri, 14 Jul 2017 10:21:25 GMT
  &lt; Set-Cookie: vmware-api-session-id=7ed7b5e95530fd95c1a6d71cf91f7140;Path=/rest;Secure;HttpOnly
  &lt; Expires: Thu, 01 Jan 1970 00:00:00 GMT
  &lt; Content-Type: application/json
  </code></pre>
  
  <p>How an I access <code>vmware-api-session-id</code> going ahead. Should I store it in a variable while executing curl?</p>