Skip to content

Instantly share code, notes, and snippets.

@eam
Created November 5, 2012 18:06
Show Gist options
  • Save eam/4019347 to your computer and use it in GitHub Desktop.
Save eam/4019347 to your computer and use it in GitHub Desktop.
def noshell_exec(cmd)
if cmd.length == 1
Kernel.exec([cmd[0], cmd[0]])
else
Kernel.exec([cmd[0], cmd[0]], *cmd[1..-1])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment