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

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
主站蜘蛛池模板: 商南县| 柳州市| 吉木萨尔县| 余庆县| 和静县| 昂仁县| 阳山县| 宁夏| 阜城县| 永济市| 盐源县| 东乌珠穆沁旗| 林口县| 华亭县| 聊城市| 施秉县| 扶余县| 玉屏| 凭祥市| 内丘县| 阜阳市| 肥城市| 岑溪市| 平武县| 太白县| 寿阳县| 青龙| 鸡西市| 大城县| 田阳县| 万安县| 和顺县| 黄山市| 南康市| 大石桥市| 丹阳市| 佛学| 鄂伦春自治旗| 鹤岗市| 家居| 云林县|