当前位置:网站首页>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
边栏推荐
- Nodejs reads the local JSON file through require. Unexpected token / in JSON at position appears
- 织梦DEDECMS安全设置指南
- Get the column name list of the table quickly in Oracle
- _ Mold_ Board_
- Document operation II (5000 word summary)
- Derivation of Σ GL perspective projection matrix
- freeCodeCamp----prob_ Calculator exercise
- Aiot industrial technology panoramic structure - Digital Architecture Design (8)
- Interface document yaml
- Customize my_ Strcpy and library strcpy [analog implementation of string related functions]
猜你喜欢

Nodejs reads the local JSON file through require. Unexpected token / in JSON at position appears

Grpc gateway based on Ocelot

ACL 2022 | dialogved: a pre trained implicit variable encoding decoding model for dialogue reply generation

Rtklib 2.4.3 source code Notes

线性代数感悟之2

Scope and scope chain in JS

Solution architect's small bag - 5 types of architecture diagrams

Document operation II (5000 word summary)

网络安全之渗透靶场实战详解

自定义my_strcpy与库strcpy【模拟实现字符串相关函数】
随机推荐
Path environment variable
Input file upload
Regular filtering of Intranet addresses and segments
feign报400处理
[problem solving] [show2012] random tree
网络安全之渗透靶场实战详解
Paging the list collection
PostgreSQL column storage and row storage
Tencent resolves the address according to the IP address
How much do you know about the process of the interview
Mock test
PHP高效读大文件处理数据
Read a blog, re understand closures and tidy up
Shell-sed命令的使用
Conversion between hexadecimal numbers
Zhimeng dedecms security setup Guide
JS to find the character that appears three times in the string
Collect blog posts
JSON deserialize anonymous array / object
1-1 NodeJS