--- from: http://rosettacode.org/wiki/Get_system_command_output