title: Command not found on gitlab ci using cat
body: <p>I have a Gitlab job in which I get a value from a .txt file. This value (v100322.1) was written into the text file in a previous stage and passing by to the job through artifacts.
  When I try to get value from the file with cat command I get this error on the pipeline:</p>
  <pre><code>$ $PACKAGE_VERSION=$(cat build.txt)
  +++ cat build.txt
  ++ $'=\377\376v100322.1\r'
  bash: line 132: $'=\377\376v100322.1\r': command not found
  </code></pre>
  <p>And this is my YAML file for GitLab-CI:</p>
  <pre><code>stages:
    - deploy
    - trigger
  
  .deploy_job_base:
    stage: deploy
    tags:
      - dotnet
    script:
      - $PACKAGE_VERSION=&quot;v100322.1&quot;
      - ${PACKAGE_VERSION} &gt; build.txt
    artifacts:
      expire_in: 1 week
      paths:
        - build.txt
    allow_failure: false
  
  deploy_job_sport:
    extends: .deploy_job_base
  
  deploy_job_TestClient:
    extends: .deploy_job_base
  
  # trigger GitLab API call
  .trigger_base:
    stage: trigger
    script:
      - $PACKAGE_VERSION=$(cat build.txt)
      - 'curl --include --fail --request POST --form &quot;token=$CI_JOB_TOKEN&quot; --form &quot;PACKAGE_VERSION=$PACKAGE_VERSION&quot; --form &quot;ref=feature/1000&quot; $GITLAB_BASE_URL/api/v4/projects/$APP_PROJECT_ID/trigger/pipeline'
  
  trigger_sport:
    extends: .trigger_base
    variables:
      APP_PROJECT_ID: &quot;2096&quot;
    needs: [deploy_job_sport]
    dependencies:
      - deploy_job_sport
  
  trigger_TestClient:
    extends: .trigger_base
    variables:
      APP_PROJECT_ID: &quot;2110&quot;
    needs: [deploy_job_TestClient]
    dependencies:
      - deploy_job_TestClient
  </code></pre>
  <p>Do you know which is the problem here?
  Thanks in advance.</p>