I'm trying to kill all ruby processes before starting a new one in a Groovy postbuild script in Jenkins. It looks like that:
def command_kill = "kill -9 `pidof ruby`"
def proc_kill = command_kill.execute()
proc_kill.waitFor()
which results in
KILL: stderr: ERROR: garbage process ID "ruby`".
What's wrong here? This works in the Debian terminal on the same server.