当前位置:网站首页>Use of Shell sort command
Use of Shell sort command
2022-04-23 17:06:00 【Magic Flute love】
sort
sort The order is in Linux It's very useful , It sorts the files , And output the sorting result standard .
Basic grammar
sort ( Options ) ( Parameters )
Options | explain |
---|---|
-n | Sort by the size of the value |
-r | In reverse order |
-t | Set the separator used for sorting |
-k | Specify the columns to sort |
Parameters : Specify the list of files to sort
Case practice
## Data preparation
[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
### according to “:” The third column after splitting is sorted in reverse order .
[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
版权声明
本文为[Magic Flute love]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231704450830.html
边栏推荐
- Document operation II (5000 word summary)
- JSON deserialize anonymous array / object
- TypeError: set_ figure_ params() got an unexpected keyword argument ‘figsize‘
- Collect blog posts
- Customize my_ Strcpy and library strcpy [analog implementation of string related functions]
- Deeply understand the relevant knowledge of 3D model (modeling, material mapping, UV, normal), and the difference between displacement mapping, bump mapping and normal mapping
- First knowledge of go language
- Bottom processing of stack memory in browser
- Blue Bridge Cup provincial road 06 -- the second game of the 12th provincial competition
- [C#] 彻底搞明白深拷贝
猜你喜欢
How much do you know about the process of the interview
. net cross platform principle (Part I)
VLAN advanced technology, VLAN aggregation, super VLAN, sub VLAN
feign报400处理
Rtklib 2.4.3 source code Notes
Nodejs reads the local JSON file through require. Unexpected token / in JSON at position appears
Lock锁
Shell script -- shell programming specification and variables
1-4 configuration executable script of nodejs installation
【生活中的逻辑谬误】稻草人谬误和无力反驳不算证明
随机推荐
【解决报错】Error in v-on handler: “TypeError: Cannot read property ‘resetFields’ of undefined”
Detailed explanation of information abstract, digital signature, digital certificate, symmetric encryption and asymmetric encryption
ASP. Net core reads the configuration file in the class library project
◰ GL shadow map core steps
自定义my_strcpy与库strcpy【模拟实现字符串相关函数】
Feign report 400 processing
PHP高效读大文件处理数据
如何用Redis实现分布式锁?
Scope and scope chain in JS
Change the password after installing MySQL in Linux
Conversion between hexadecimal numbers
Encapsulating the logging module
Mock test
How to implement distributed locks with redis?
[PROJECT] small hat takeout (8)
Baidu Map Case - Zoom component, map scale component
Detailed explanation of Milvus 2.0 quality assurance system
New keyword learning and summary
杂文 谈谈古典的《拆掉思维里的墙》
Path environment variable