值得一提的shell命令

tac命令

[root@localhost ~]# cat 1.txt
1

2

3

4

5
[root@localhost ~]# tac 1.txt

5

4

3

2

1

rev命令

[root@localhost ~]# cat 1.txt

1234567

[root@localhost ~]# rev 1.txt

7654321

join命令

[root@localhost ~]# cat 1.txt

1 aaa

2 bbb

3 ccc

[root@localhost ~]# cat 2.txt

1 eee

2 fff

3 ggg

[root@localhost ~]# join 1.txt 2.txt >3.txt

[root@localhost ~]# cat 3.txt

1 aaa eee

2 bbb fff

3 ccc ggg

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章