SyntaxFix
Write A Post
Hire A Developer
Questions
A short version would be:
echo sh(script: 'ls -al', returnStdout: true).result