groovy execute with parameters containing spaces

The trick was to use a list:

println(['ls', '/tmp/folder with spaces'].execute().text)

Leave a Comment