title: Printing jenkins credentials Id
body: <p>Does anyone know how I can print credentials stored in jenkins?
  Below script throws:</p>
  <pre><code>Unexpected exception caught! groovy.lang.MissingPropertyException: No such property: crd for class: com.test.File
  </code></pre>
  <p>Here is my code:</p>
  <p>service.groovy</p>
  <pre><code>withCredentials([usernamePassword(
      credentialsId: vaultCredentialId, usernameVariable: 'ID', passwordVariable: 'CRED')]){
  
  
  sh &quot;&quot;&quot;
      crd=${CRED}
      for chars in `echo $crd | fold -w1`; do echo &quot;value: $chars&quot; ; done
  &quot;&quot;&quot;
  </code></pre>