日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
深入了解Linux命令中的排序方法(linux命令排序)

SORT command is the most commonly used command for sorting files in linux. It is a command line utility that can be used to sort files according to various criteria, like alphabetically, numerically and chronologically.

成都創(chuàng)新互聯(lián)為您提適合企業(yè)的網(wǎng)站設(shè)計?讓您的網(wǎng)站在搜索引擎具有高度排名,讓您的網(wǎng)站具備超強的網(wǎng)絡(luò)競爭力!結(jié)合企業(yè)自身,進行網(wǎng)站設(shè)計及把握,最后結(jié)合企業(yè)文化和具體宗旨等,才能創(chuàng)作出一份性化解決方案。從網(wǎng)站策劃到成都網(wǎng)站設(shè)計、網(wǎng)站制作, 我們的網(wǎng)頁設(shè)計師為您提供的解決方案。

Sort command provides many options/flags to sort files in different manners. It also accepts options to sort in reverse order, to ignore differences between folded and upper/lower cases and to discard empty lines.

Example 1:

Sort Alphabetically

The below example shows how to sort a file containing a list of words in alphabetic order.

$sort words.txt

apple

banana

cat

dog

Example 2:

Sort Numerically

The below example shows how to sort a file containing a list of numbers in a numerical order.

$sort -n numbers.txt

1

2

3

4

Example 3:

Sort in Reverse order

The below example shows how to sort a file containing a list of words in reverse alphabetical order.

$sort -r words.txt

dog

cat

banana

apple

Example 4:

Ignore Case differences

The below example shows how to sort a file containing a list of words ignoring their case differences.

$sort -f words.txt

apple

banana

Cat

dog

Example 5:

Discard empty lines

The below example shows how to sort a file containing a list of words and dropping empty lines in the output.

$sort -z words.txt

apple

banana

cat

dog

In conclusion, the sort command is a useful utility to arrange files in Linux according to various criteria. It provides many options which can be used to sort files with different conditions and produce expected result. With the help of these examples, you can easily understand more about sorting files using this command.

成都網(wǎng)站建設(shè)選創(chuàng)新互聯(lián)(?:028-86922220),專業(yè)從事成都網(wǎng)站制作設(shè)計,高端小程序APP定制開發(fā),成都網(wǎng)絡(luò)營銷推廣等一站式服務(wù)。


當(dāng)前文章:深入了解Linux命令中的排序方法(linux命令排序)
轉(zhuǎn)載注明:http://m.5511xx.com/article/dhhecje.html