I don't know if this will always work (for example, cygwin may return unix line endings on a Windows system). Use StringUtil.LINE_SPLITTER to split the output by lines.