Article Image
read
去掉空白行
tr -s ["\012"] < test.txt > newtest.txt
sed -n '/./p' temp_file5 > newtest.txt
grep . temp_file5 > newtest.txt
grep -v '^$' temp_file5 > newtest.txt去掉多余空格
cat test.txt | tr -s [:space:]
sed 's/__*/_/g' test.txt //这里,_表示一个空格