I have a Jenkinsfile with a line like this: def result = sh(script: "echo \'before\' && sleep 20 && echo \'after\'", returnStdout: true).
def result = sh(script: "echo \'before\' && sleep 20 && echo \'after\'", returnStdout: true).