- Learning Linux Shell Scripting
- Ganesh Naik
- 81字
- 2021-06-25 22:02:50
The sort command
This command sorts the contents of a text file, line by line. The options are as follows:
- -n: Sorts as per the numeric value
- -d: Sorts as per the dictionary meaning
- -h: Compares as per the human-readable numbers (for example, 1K 2G)
- -r: Sorts in the reverse order
- -t: Option to specify a delimiter for fields
- +num: Specifies sort field numbers
- -knum: Specifies sort field numbers
- $ sort -k4 sample.txt: This will sort according to the fourth field

推薦閱讀
- 圖解PLC控制系統(tǒng)梯形圖和語(yǔ)句表
- ServiceNow Cookbook
- 大數(shù)據(jù)平臺(tái)異常檢測(cè)分析系統(tǒng)的若干關(guān)鍵技術(shù)研究
- 數(shù)據(jù)掘金
- 從零開始學(xué)C++
- 深度學(xué)習(xí)與目標(biāo)檢測(cè)
- 空間機(jī)械臂建模、規(guī)劃與控制
- Flink原理與實(shí)踐
- Silverlight 2完美征程
- Learning ServiceNow
- 未來(lái)學(xué)徒:讀懂人工智能飛馳時(shí)代
- 玩機(jī)器人 學(xué)單片機(jī)
- 大數(shù)據(jù)素質(zhì)讀本
- FANUC工業(yè)機(jī)器人虛擬仿真教程
- 巧學(xué)活用WPS