Skip to content

Instantly share code, notes, and snippets.

@slemarchand
Created October 10, 2011 00:26
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slemarchand/1274412 to your computer and use it in GitHub Desktop.
Save slemarchand/1274412 to your computer and use it in GitHub Desktop.
Execute a shell command from Liferay control panel ("Server Administration -> Script") and get ouptut
def exec = { cmd -> def p = cmd.execute(); out.leftShift(new SequenceInputStream(p.getErr(), p.getIn())) }
exec('df -h -a -i -T')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment