diff -up sos-2.2/sos/helpers.py.orig sos-2.2/sos/helpers.py --- sos-2.2/sos/helpers.py.orig 2012-10-17 15:15:38.579337535 +0100 +++ sos-2.2/sos/helpers.py 2012-10-17 15:16:59.267361867 +0100 @@ -54,6 +54,8 @@ def sosGetCommandOutput(command, timeout p = Popen(command, shell=True, stdout=PIPE, stderr=STDOUT, bufsize=-1) stdout, stderr = p.communicate() + # hack to delete trailing '\n' added by p.communicate() + if stdout[-1:] == '\n': stdout = stdout[:-1] return (p.returncode, stdout, 0) def commonPrefix(l1, l2, common = []):