linux 中将多个连续的空行压缩为一个空行

 

001、

(base) root@PC1:/home/test2# ls
a.txt
(base) root@PC1:/home/test2# cat a.txt
1



2



8

10
(base) root@PC1:/home/test2# cat -s a.txt           ## 将多个连续的空行压缩为一个空行
1

2

8

10

 

posted @ 2022-08-11 13:35  小鲨鱼2018  阅读(49)  评论(0编辑  收藏  举报