shell替换掉两个以上的空格

方法一:
sed 's/ +/ /g' test.txt > test1.txt
原文地址:https://www.cnblogs.com/jjzd/p/6397049.html