os.popen(cmd) .read() 获取执行后的结果自动带有换行符
>>> a=os.popen("ls ./soapnuke_output/CL100006359_L01_8 |wc -l")
>>> a
<open file 'ls ./soapnuke_output/CL100006359_L01_8 |wc -l', mode 'r' at 0x7f66e8038c00>
>>> a.read
<built-in method read of file object at 0x7f66e8038c00>
>>> a.read()
'17
'
>>> b=os.popen("echo bb")
>>> b
<open file 'echo bb', mode 'r' at 0x7f66e8038c90>
>>> b.read()
'bb
'