title: Groovy string substitution txt file gives 0
body: <p>In the below code I am reading a .txt file and want to write it's content to the variable userId. But when I do <code>echo "${userId}"</code> I get 0, how come? The file itself is located in a SVN branch and I am using jenkins pipeline.</p>
  
  <pre><code>def userId = bat script: 'for /f "delims=" %%a in (user_id.txt) do echo %%a', returnStdout: true
  </code></pre>
  
  <p>edit: the txt file contains one line of an user id (for example cronaldo)</p>