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 echo "${userId}"
I get 0, how come? The file itself is located in a SVN branch and I am using jenkins pipeline.
def userId = bat script: 'for /f "delims=" %%a in (user_id.txt) do echo %%a', returnStdout: true
edit: the txt file contains one line of an user id (for example cronaldo)