【发布时间】:2021-07-22 02:03:20
【问题描述】:
我有 jenkins 作业来执行 shell 脚本,但在寻找匹配项时收到错误意外 EOF
servicedir="dir1"
checkdir = sh(
script: "ssh user@hostname bash -c \"' find /home -name \"${servicedir}\" | wc -l '\"",
returnStdout: true
)
返回以下错误
bash -c ''\'' find /home -name dir1'
bash: -c: line 0: unexpected EOF while looking for matching `''
bash: -c: line 1: syntax error: unexpected end of file
【问题讨论】:
标签: linux shell jenkins jenkins-groovy