Sort-sort lines of text files
Parameters:
-F ignores case
-B ignores the front-most whitespace section
-M sort by the name of the month
-N sort with a pure number (by default, sort by text type)
-R Reverse Sort
-U is uniq, and in the same data, only one row represents
-T delimiter, the default is to use the TAB key to split like the-D parameter in cut to specify the delimiter
-K to sort by that interval is similar to the-f parameter in cut to specify the interval
[Email protected] test]#CatC.txt A:3D:1e: AC:5B:6[email protected] test]#CatC.txt |sort//default is a space before, note is uppercase in fronte: AC:5D:1A:3B:6[email protected] test]#CatC.txt |Sort-b //Ignore the preceding spaces, which are uppercase letters in front C:5D:1A:3B:6e: A[email protected] test]#CatC.txt |Sort-BF //ignores the preceding spaces, and ignores case a:3B:6C:5D:1e: A[email protected] test]#CatC.txt |Sort-T":"-K2 //specify ":" As a delimiter, and sort by the second column, note that by default the first character in the second column is sorted, so 22 is not the last D:1e: AA:3C:5B:6[email protected] test]#CatC.txt |Sort-n-t":"-K2 //Use-N to specify the sort of a pure number after 22 becomes the last D:1A:3C:5B:6e: A[email protected] test]#
The Linux Sort command