当前位置:网站首页>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
边栏推荐
- PyMySQL
- Document operation II (5000 word summary)
- 如何用Redis实现分布式锁?
- 1-5 nodejs commonjs specification
- Encapsulating the logging module
- 织梦DEDECMS安全设置指南
- freeCodeCamp----prob_ Calculator exercise
- MySQL restores data through binlog file
- Expression "func" tSource, object "to expression" func "tSource, object" []
- Wiper component encapsulation
猜你喜欢

Lock锁

【生活中的逻辑谬误】稻草人谬误和无力反驳不算证明

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

Signalr can actively send data from the server to the client

Milvus 2.0 détails du système d'assurance de la qualité

Sub database and sub table & shardingsphere

SQL database

How vscode compares the similarities and differences between two files

Scope and scope chain in JS

【WPF绑定3】 ListView基础绑定和数据模板绑定
随机推荐
1-2 JSX syntax rules
Path environment variable
文件操作《二》(5000字总结篇)
C# Task. Delay and thread The difference between sleep
Solution architect's small bag - 5 types of architecture diagrams
Change the password after installing MySQL in Linux
Shell-入门、变量、以及基本的语法
[PROJECT] small hat takeout (8)
SQL: How to parse Microsoft Transact-SQL Statements in C# and to match the column aliases of a view
EF core in ASP Generate core priority database based on net entity model
Promise (I)
Devexpress GridView add select all columns
AIOT产业技术全景结构-数字化架构设计(8)
织梦DEDECMS安全设置指南
◰ GL shader handler encapsulation
Tencent resolves the address according to the IP address
Introduction to new functions of camtasia2022 software
How much do you know about the process of the interview
Bytevcharts visual chart library, I have everything you want
Summary of common websites