linux 中 sort -R参数, 随机排序

1、测试

[root@rhelpc1 test2]# ls
[root@rhelpc1 test2]# seq 10 > a.txt
[root@rhelpc1 test2]# ls
a.txt
[root@rhelpc1 test2]# cat a.txt   ## 测试数据
1
2
3
4
5
6
7
8
9
10
[root@rhelpc1 test2]# sort -R a.txt   ## 随机排序
1
10
7
3
5
2
4
9
6
8
[root@rhelpc1 test2]# sort -R a.txt  ## 随机排序
6
8
7
2
1
9
10
3
4
5

 

posted @ 2022-03-29 15:46  小鲨鱼2018  阅读(486)  评论(0)    收藏  举报