sed 替换多个空格为一个

sed -i 's/[ ][ ]*/ /g'  file.txt
原文地址:https://www.cnblogs.com/gavanwanggw/p/7403241.html