当前位置:网站首页>Shell-sort命令的使用
Shell-sort命令的使用
2022-04-23 17:04:00 【魔笛Love】
sort
sort命令是在Linux里非常有用,它将文件进行排序,并将排序结果标准输出。
基本语法
sort (选项) (参数)
| 选项 | 说明 |
|---|---|
| -n | 依照数值的大小排序 |
| -r | 以相反的顺序来排序 |
| -t | 设置排序时所用的分隔字符 |
| -k | 指定需要排序的列 |
参数:指定待排序的文件列表
案例实操
## 数据准备
[bd@localServer ~]$ touch sort.sh
[bd@localServer ~]$ vim sort.sh
bb:40:5.4
bd:20:4.2
xz:50:2.3
ww:10:3.5
ss:30:1.6
### 按照“:”分割后的第三列倒序排序。
[atguigu@hadoop102 datas]$ sort -t : -nrk 3 sort.sh
bb:40:5.4
bd:20:4.2
ww:10:3.5
xz:50:2.3
ss:30:1.6
版权声明
本文为[魔笛Love]所创,转载请带上原文链接,感谢
https://blog.csdn.net/clearlxj/article/details/121742606
边栏推荐
- freeCodeCamp----shape_ Calculator exercise
- 扫码登录的原理你真的了解吗?
- 如何用Redis实现分布式锁?
- Change the password after installing MySQL in Linux
- El cascade and El select click elsewhere to make the drop-down box disappear
- Derivation of Σ GL perspective projection matrix
- Copy constructor shallow copy and deep copy
- On lambda powertools typescript
- Calculation formula related to tolerance analysis
- Aiot industrial technology panoramic structure - Digital Architecture Design (8)
猜你喜欢
随机推荐
如何用Redis实现分布式锁?
Redis docker installation
文件操作《二》(5000字总结篇)
ACL 2022 | dialogved: a pre trained implicit variable encoding decoding model for dialogue reply generation
织梦DEDECMS安全设置指南
Use between nodejs modules
【题解】[SHOI2012] 随机树
Interface document yaml
Quick install mongodb
[markdown notes]
Sub database and sub table & shardingsphere
ByteVCharts可视化图表库,你想要的我都有
JS to find the character that appears three times in the string
1-3 nodejs installation list configuration and project environment
Talk about browser cache control
Get the column name list of the table quickly in Oracle
Go language RPC communication
聊一聊浏览器缓存控制
Smart doc + Torna generate interface document
Detailed explanation of information abstract, digital signature, digital certificate, symmetric encryption and asymmetric encryption







![[PROJECT] small hat takeout (8)](/img/54/0187eeb637f4dcd4ad3969b00e2b77.png)

