How do I call shell commands from inside of a Ruby program? How do I then get output from these commands back into Ruby?
The easiest way is, for example:
reboot = `init 6` puts reboot