官术网_书友最值得收藏!

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
主站蜘蛛池模板: 开平市| 新乡市| 方正县| 通海县| 华宁县| 万山特区| 威宁| 新和县| 旺苍县| 珠海市| 金寨县| 澄城县| 崇义县| 观塘区| 武汉市| 临安市| 和平区| 东城区| 云浮市| 齐齐哈尔市| 义乌市| 巴林右旗| 高碑店市| 红河县| 瑞金市| 永平县| 都江堰市| 昔阳县| 攀枝花市| 沽源县| 长葛市| 筠连县| 陇川县| 两当县| 闻喜县| 容城县| 阿拉善右旗| 龙州县| 台中县| 桐庐县| 鄂伦春自治旗|