linux 中 sed命令切香肠

 

1、

root@PC1:/home/test2# ls
a.txt
root@PC1:/home/test2# cat a.txt
1
2
3
4
root@PC1:/home/test2# cat a.txt | sed "H; g"

1

1
2

1
2
3

1
2
3
4

 

posted @ 2022-05-01 12:41  小鲨鱼2018  阅读(27)  评论(0编辑  收藏  举报