bat step fails, when command contains "^" (script returned exit code 1)

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      I am implementing a Jenkins pipeline. One bat step contains the following command:

      bat "findstr /R \"^.M\" file.txt"

      This step fails with the message "ERROR: script returned exit code 1".
      The circumflex character seems to cause the error.

      bat "findstr /R \".M\" file.txt"

      ...works fine.

            Assignee:
            Unassigned
            Reporter:
            sradi
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: