0

I'm trying to use find command with a backslash on the command below at groovy syntax:

stage("ArtifactRename") {
    sh '''find "./os/mcu/GNU ARM v10.2.1 - Debug" -name "\\final_mcu2*.zip" -exec cp {} ./artifacts/mcu_final_all.zip \\;'''
}

When I try to build this command on a Jenkins pipeline gives me an error about this syntax. Even before I do this command have a warning with red syntax on Jenkins form field saying unexpected char: ''.

Is the error due to backslash or whitespace in the folder name?

What could I do to replace or fix the error with this backslash?

The console output shows as follows:

bash.exe: warning: could not find /tmp, please create!
+ find './os/mcu/GNU ARM v10.2.1 - Debug' -name '\final_mcu2*.zip' -exec cp '{}' ./artifacts/mcu_final_all.zip ';'
File not found - \final_mcu2*.zip
Ali Khakbaz
  • 1,057

0 Answers0