title: Conditional Parameter Substitution while using cat
body: <p>I'm using cat to create file from environment variable.</p>
  
  <pre><code>cat &lt;&lt;EOF &gt; config
  environment = ${ENVIRONMENT:-dev}
  EOF
  </code></pre>
  
  <p>I need dev, even if it is <code>development</code> or <code>develop</code>. I cannot trim  it because, it has other possible values like <code>qa</code>, <code>demo</code>, <code>staging</code> etc.</p>
  
  <p>Please Note: I cannot use if statement, in my environment. Its used in Jenkins Execute Shell, I have a parameterized build, using if will require me repeat the above cat, multiple times</p>
  
  <p>Any easy way Guys..</p>
  
  <p>regards,
  Shan</p>