"Or" is the name of the "|" operator. From the looks of it it's impossible to overload "||" in groovy.
By the way the "|" operator and the "or" method both call "pipeTo" directly so a third way to write it would be:
"ls".execute().pipeTo("grep -i old".execute()).waitForProcessOutput(System.out, System.out)
"Or" is the name of the "|" operator. From the looks of it it's impossible to overload "||" in groovy.
By the way the "|" operator and the "or" method both call "pipeTo" directly so a third way to write it would be:
"ls".execute().pipeTo("grep -i old".execute()).waitForProcessOutput(System.out, System.out)