Knowledge

sort (Unix)

Source πŸ“

3342: 2893: 2915: 27: 1931:
means larger, otherwise the leftmost digits that differ determine the result). Blocks are compared left-to-right and the first non-equal block in that loop decides which text is larger. This happens to work for IP addresses, Debian package version strings and similar tasks where numbers of variable length are embedded in strings.
1930:
option which is a natural sort of (version) numbers within text. Two text strings that are to be compared are split into blocks of letters and blocks of digits. Blocks of letters are compared alpha-numerically, and blocks of digits are compared numerically (i.e., skipping leading zeros, more digits
221:
in sorted order. Sorting is done based on one or more sort keys extracted from each line of input. By default, the entire input is taken as sort key. Blank space is the default field separator. The command supports a number of
1788:
dictates breaking ties using the value in column 1, sorting alphabetically by default. Note that bob, and chad have the same quota and are sorted alphabetically in the final output.
2128:
The $ '...' string literal syntax was added to ksh93 to solve the problem of entering special characters in scripts. It uses ANSI-C rules to translate the string between the '...'.
2196: 2094:
Words of the form $ 'string' are treated specially. The word expands to string, with backslash-escaped characters replaced as specified by the ANSI C standard.
1914:
option based on hashing; this is not a full random shuffle because it will sort identical lines together. A true random sort is provided by the Unix utility
3451: 3379: 3811: 3776: 3816: 3970: 3496: 2953: 2115: 3859: 3841: 3622: 3955: 3806: 3547: 3406: 2281: 3372: 1784:
is used instead, the sort key would begin at column 2 and extend to the end of the line, spanning all the fields in between.
1836:
to be specified as the column delimiter. This illustration uses the shell's dollar-quote notation to specify the tab as a
2180: 2157: 2052: 3365: 223: 156: 3960: 2906: 2901: 2107: 3975: 2946: 2931: 2081: 2259: 3950: 3945: 2742: 2274: 3276: 2245: 376: 129: 266:, but sort retained an option to name the output file because it was used to sort a file in place. In 3884: 3766: 3357: 3312: 3232: 2878: 2848: 255: 50: 3965: 3346: 2939: 2863: 97: 2467: 2457: 1568:
command produces output that starts with a number, the file size, so its output can be piped to
3391: 2965: 2919: 2624: 2293: 2267: 1713:
option lets you sort on a key that is potentially composed of multiple fields (start at column
2111: 2962: 2231: 1945: 1837: 1780:
specifies sorting on the key starting and ending with column 2, and sorting numerically. If
371: 218: 125: 3263: 2794: 2172: 1829: 121: 64: 8: 3879: 1408:
Specify the number of digits to determine how many digits of each line should be judged.
161: 68: 3388: 144: 2082:"The GNU Bash Reference Manual, for Bash, Version 4.2: Section 3.1.2.4 ANSI-C Quoting" 2176: 2153: 300: 3131: 2694: 2599: 2594: 1975: 210: 168: 104: 3731: 1999:
A Research Unix reader: annotated excerpts from the Programmer's Manual, 1971–1986
1181:
Unique processing to suppress all but one in each set of lines having equal keys.
3851: 3521: 3327: 3219: 3053: 2873: 2817: 2722: 2523: 2426: 2149: 1997: 3746: 3456: 3322: 3281: 3204: 3161: 3136: 3069: 3013: 2812: 2747: 2732: 2669: 2629: 2508: 2472: 2366: 346: 271: 267: 259: 247: 149: 295:
Similar commands are available on many other operating systems, for example a
3939: 3899: 3869: 3771: 3761: 3587: 3317: 3196: 3048: 2969: 2961: 2853: 2714: 2649: 2421: 2396: 2297: 1833: 288:
was written by Mike Haertel and Paul Eggert. This implementation employs the
214: 3909: 3662: 3632: 3511: 3291: 3156: 3043: 2827: 2727: 2644: 2639: 2543: 2452: 2416: 2371: 2289: 2254: 2034: 1993: 251: 199: 46: 242:
command that invokes a general sort facility was first implemented within
3904: 3874: 3864: 3796: 3786: 3675: 3607: 3602: 3597: 3516: 3209: 3166: 3141: 2763: 2737: 2674: 2654: 2619: 2609: 2604: 2487: 2477: 2431: 1601: 182: 3924: 3914: 3889: 3846: 3667: 3637: 3592: 3582: 3562: 3095: 2993: 2579: 2538: 2341: 2311: 289: 263: 58: 41: 3387: 2239: 2225: 3781: 3741: 3700: 3680: 3642: 3627: 3617: 3501: 3491: 3461: 3441: 3436: 3431: 3286: 3271: 3186: 3171: 3074: 3038: 3008: 3003: 2998: 2868: 2822: 2802: 2699: 2679: 2634: 2482: 2406: 2391: 2376: 2361: 2356: 2351: 2346: 1940: 1564: 285: 207: 191: 173: 117: 3836: 3821: 3721: 3690: 3526: 3227: 3116: 2784: 2564: 2249: 2217: 2016: 3791: 3736: 3647: 3237: 2589: 2513: 2200: 391: 381: 308: 243: 177: 133: 109: 1562:
option makes the program sort according to numerical value. The
3919: 3826: 3726: 3612: 3577: 3557: 3552: 3486: 3476: 3090: 2574: 2316: 3894: 3801: 3716: 3685: 3567: 3506: 3481: 3471: 3426: 3421: 3416: 3411: 3176: 3028: 2988: 2983: 2807: 2704: 2684: 2614: 2533: 2436: 2411: 2386: 2336: 2331: 2326: 2321: 2213: 1647:" to sort on the second column. In old versions of sort, the 1611: 396: 386: 319: 213:, that prints the lines of its input or concatenation of all 137: 2207: 1609:
option prints file sizes in the 7th field, so a list of the
1572:
to produce a list of files sorted by (ascending) file size:
3756: 3695: 3652: 3572: 3296: 3253: 3181: 3126: 3121: 3018: 2858: 2832: 2768: 2689: 2584: 2569: 2528: 2518: 2462: 2290: 1955: 1950: 1915: 1651:
option made the program sort on the second column of data (
943: 366: 203: 113: 26: 2035:"MSX-DOS2 Tools User's Manual - MSX-DOS2 TOOLS γƒ¦γƒΌγ‚ΆγƒΌγ‚Ίγƒžγƒ‹γƒ₯をル" 3831: 3751: 3146: 3111: 3033: 2659: 2559: 2503: 2401: 2060: 2048: 282: 3531: 3466: 3446: 3023: 2381: 1643:
option to sort on a certain column. For example, use "
976:
Stabilizes sort by disabling last-resort comparison.
745:
Merge only; input files are assumed to be presorted.
2017:"sort(1): sort lines of text files - Linux man page" 1502: 786:Compares (unknown) < 'JAN' < ... < 'DEC'. 511:Considers only blanks and alphanumeric characters. 226:
that can vary by implementation. For instance the "
2084:. Free Software Foundation, Inc. 28 December 2010 475:Like -c, but does not report the first bad line. 3937: 1791: 1655:for the third, etc.). This usage is deprecated. 2146:The Linux Command Line: A Complete Introduction 1823: 942:Shuffles, but groups identical keys. See also: 590:Compares according to general numerical value. 2169:The Mac OS X Command Line: Unix Under the Hood 1217:Natural sort of (version) numbers within text 827:Compares according to string numerical value. 631:Compare human readable numbers (e.g., 2K 1G). 3373: 2947: 2275: 2053:"IBM System i Version 7.2 Programming Qshell" 2037:. April 1, 1993 – via Internet Archive. 1879:option just reverses the order of the sort: 1776:Here the first sort is done using column 2. 1470:Include hidden files when using wild cards. 2143: 2099: 1022:for the maximum size of the memory buffer. 3380: 3366: 2954: 2940: 2914: 2282: 2268: 2255:Further details about sort at Softpanorama 1704: 1615:files sorted by file size is produced by: 1248:Like -i, but ignore only tabs and spaces. 1099:instead of non-blank to blank transition. 547:Fold lower case to upper case characters. 25: 2166: 2005:(Technical report). CSTR. Bell Labs. 139. 250:. This version was originally written by 2105: 1053:'Tab character' separating fields is x. 1992: 3938: 3361: 2935: 2263: 1986: 667:Considers only printable characters. 270:, Thompson invented "-" to represent 1634: 1377:Reverses the result of comparisons. 1346:Output version information and exit 901:Reverses the result of comparisons. 318:command has also been ported to the 230:" flag will reverse the sort order. 3971:Inferno (operating system) commands 1284:End lines with 0 byte, not newline 13: 2137: 1921: 1870: 14: 3987: 2190: 1905: 1553: 1503:Sort a file in alphabetical order 865:file instead of standard output. 444:Check that input file is sorted. 3341: 3340: 2913: 2892: 2891: 2199:The original BSD Unix program's 2144:Shotts (Jr), William E. (2012). 262:Thompson had modified it to use 2118:from the original on 2013-05-27 2047: 3956:Unix text processing utilities 2074: 2041: 2027: 2009: 1968: 1: 2234:Programmer's Manual, Volume 1 1961: 1926:The GNU implementation has a 1910:The GNU implementation has a 1792:Sorting a pipe delimited file 352: 1824:Sorting a tab delimited file 7: 1934: 1497: 356: 10: 3992: 256:AT&T Bell Laboratories 233: 51:AT&T Bell Laboratories 3709: 3540: 3399: 3336: 3305: 3262: 3246: 3218: 3195: 3104: 3083: 3062: 2976: 2887: 2841: 2793: 2777: 2756: 2713: 2552: 2496: 2445: 2304: 1548:Smith, Brett 555-4321 1545:Fogarty, Suzie 555-2314 1542:Doe, John 555-1234 1539:Doe, Jane 555-3214 1536:Avery, Cory 555-4132 1525:Fogarty, Suzie 555-2314 1522:Avery, Cory 555-4132 1519:Doe, Jane 555-3214 1516:Doe, John 555-1234 1513:Smith, Brett 555-4321 345:, the command reads from 325: 239: 167: 155: 143: 103: 93: 75: 57: 40: 32: 24: 2167:McElhearn, Kirk (2006). 1881: 1842: 1795: 1749: 1723: 1680: 1657: 1617: 1574: 1529: 1506: 413:Ignores leading blanks. 246:. Later, it appeared in 1856:Fogarty, Suzie 555-2314 1705:Sort on multiple fields 1585:4 /bin/domainname 409:--ignore-leading-blanks 3961:Unix SUS2008 utilities 3392:command-line interface 2966:command-line interface 2907:Unix SUS2008 utilities 2902:Standard Unix programs 2294:command-line interface 1315:Display help and exit 1134:--temporary-directory= 714:(default end of line) 710:(origin 1), end it at 585:--sort=general-numeric 579:--general-numeric-sort 81:; 52 years ago 3976:IBM i Qshell commands 2197:Original Sort manpage 2173:John Wiley & Sons 1946:List of Unix commands 1865:Smith, Brett 555-4321 1754:sort-k2,2n-k1,1quota 79:November 3, 1971 16:Standard UNIX utility 3264:Software development 2795:Software development 1862:Avery, Cory 555-4132 1830:tab separated values 1828:Sorting a file with 1439:Sort by ASCII code. 663:--ignore-nonprinting 627:--sort=human-numeric 622:--human-numeric-sort 224:command-line options 299:command is part of 21: 3951:Sorting algorithms 3946:Computing commands 3389:GNU Core Utilities 2110:; Vo, Kiem-Phong. 2106:Fowler, Glenn S.; 1980:www.multicians.org 1976:"Multics Commands" 1859:Doe, Jane 555-3214 1853:Doe, John 555-1234 1088:--field-separator= 507:--dictionary-order 322:operating system. 42:Original author(s) 19: 3933: 3932: 3355: 3354: 2929: 2928: 2248:General commands 1928:-V --version-sort 1886:sort-rk2nzipcode 1838:C escape sequence 1800:sort-k2,2,-k1,1-t 1635:Columns or fields 1624:"*.tex" 1605:command with the 1495: 1494: 1280:--zero-terminated 1145:for temporaries. 211:operating systems 188: 187: 3983: 3382: 3375: 3368: 3359: 3358: 3344: 3343: 3084:User environment 2956: 2949: 2942: 2933: 2932: 2917: 2916: 2895: 2894: 2497:User environment 2284: 2277: 2270: 2261: 2260: 2243: 2242: 2229: 2228: 2211: 2210: 2186: 2163: 2131: 2130: 2125: 2123: 2103: 2097: 2096: 2091: 2089: 2078: 2072: 2071: 2069: 2068: 2057: 2045: 2039: 2038: 2031: 2025: 2024: 2013: 2007: 2006: 2004: 1990: 1984: 1983: 1972: 1929: 1913: 1912:-R --random-sort 1901: 1898: 1895: 1892: 1889: 1885: 1878: 1866: 1863: 1860: 1857: 1854: 1850: 1846: 1819: 1816: 1813: 1810: 1807: 1803: 1799: 1787: 1783: 1779: 1772: 1769: 1766: 1763: 1760: 1757: 1753: 1746: 1743: 1740: 1737: 1734: 1731: 1727: 1720: 1717:, end at column 1716: 1712: 1700: 1697: 1694: 1691: 1688: 1685:sort-k2nzipcode 1684: 1677: 1674: 1671: 1668: 1665: 1661: 1654: 1650: 1646: 1642: 1629: 1625: 1621: 1614: 1608: 1604: 1595: 1594:304 /bin/csh 1592: 1589: 1586: 1582: 1578: 1571: 1567: 1561: 1549: 1546: 1543: 1540: 1537: 1533: 1526: 1523: 1520: 1517: 1514: 1510: 1467: 1436: 1405: 1374: 1343: 1312: 1281: 1276: 1245: 1214: 1209: 1178: 1173: 1135: 1127: 1089: 1081: 1050: 1012: 1004: 973: 939: 934: 929: 898: 893: 855: 824: 819: 814: 783: 778: 773: 742: 700: 695: 664: 659: 628: 623: 618: 587: 586: 580: 575: 544: 539: 508: 503: 472: 441: 410: 405: 357: 344: 340: 336: 317: 298: 280: 241: 229: 105:Operating system 89: 87: 82: 34: 29: 22: 18: 3991: 3990: 3986: 3985: 3984: 3982: 3981: 3980: 3966:Plan 9 commands 3936: 3935: 3934: 3929: 3710:Shell utilities 3705: 3536: 3395: 3386: 3356: 3351: 3332: 3301: 3258: 3242: 3214: 3191: 3105:Text processing 3100: 3079: 3058: 2972: 2960: 2930: 2925: 2883: 2837: 2789: 2773: 2752: 2709: 2553:Text processing 2548: 2492: 2441: 2300: 2288: 2238: 2237: 2224: 2223: 2220:– User Commands 2206: 2205: 2193: 2183: 2160: 2150:No Starch Press 2140: 2138:Further reading 2135: 2134: 2121: 2119: 2112:"KornShell FAQ" 2104: 2100: 2087: 2085: 2080: 2079: 2075: 2066: 2064: 2055: 2046: 2042: 2033: 2032: 2028: 2015: 2014: 2010: 2002: 1991: 1987: 1974: 1973: 1969: 1964: 1937: 1927: 1924: 1922:Sort by version 1911: 1908: 1903: 1902: 1899: 1896: 1893: 1890: 1887: 1883: 1876: 1873: 1871:Sort in reverse 1868: 1867: 1864: 1861: 1858: 1855: 1852: 1848: 1844: 1826: 1821: 1820: 1817: 1814: 1811: 1808: 1805: 1801: 1797: 1794: 1785: 1781: 1777: 1774: 1773: 1770: 1767: 1764: 1761: 1758: 1755: 1751: 1748: 1747: 1744: 1741: 1738: 1735: 1732: 1729: 1725: 1718: 1714: 1710: 1707: 1702: 1701: 1698: 1695: 1692: 1689: 1686: 1682: 1679: 1678: 1675: 1672: 1669: 1666: 1663: 1659: 1652: 1648: 1644: 1640: 1637: 1632: 1631: 1627: 1623: 1619: 1610: 1606: 1600: 1597: 1596: 1593: 1591:102 /bin/sh 1590: 1588:24 /bin/ls 1587: 1584: 1580: 1576: 1569: 1563: 1559: 1556: 1551: 1550: 1547: 1544: 1541: 1538: 1535: 1531: 1528: 1527: 1524: 1521: 1518: 1515: 1512: 1508: 1505: 1500: 1465: 1434: 1403: 1372: 1341: 1310: 1279: 1278: 1274: 1243: 1212: 1211: 1207: 1176: 1175: 1171: 1133: 1132: 1125: 1087: 1086: 1079: 1048: 1010: 1009: 1002: 971: 937: 936: 932: 931: 927: 896: 895: 891: 853: 822: 821: 817: 816: 812: 781: 780: 776: 775: 771: 740: 706:Start a key at 698: 697: 693: 662: 661: 657: 626: 625: 621: 620: 616: 584: 583: 582: 578: 577: 573: 542: 541: 537: 506: 505: 501: 470: 439: 408: 407: 403: 355: 342: 338: 334: 331: 328: 315: 296: 278: 277:The version of 236: 227: 180: 85: 83: 80: 76:Initial release 36: 17: 12: 11: 5: 3989: 3979: 3978: 3973: 3968: 3963: 3958: 3953: 3948: 3931: 3930: 3928: 3927: 3922: 3917: 3912: 3907: 3902: 3897: 3892: 3887: 3882: 3877: 3872: 3867: 3862: 3857: 3854: 3849: 3844: 3839: 3834: 3829: 3824: 3819: 3814: 3809: 3804: 3799: 3794: 3789: 3784: 3779: 3774: 3769: 3764: 3759: 3754: 3749: 3744: 3739: 3734: 3729: 3724: 3719: 3713: 3711: 3707: 3706: 3704: 3703: 3698: 3693: 3688: 3683: 3678: 3673: 3670: 3665: 3660: 3655: 3650: 3645: 3640: 3635: 3630: 3625: 3620: 3615: 3610: 3605: 3600: 3595: 3590: 3585: 3580: 3575: 3570: 3565: 3560: 3555: 3550: 3544: 3542: 3541:Text utilities 3538: 3537: 3535: 3534: 3529: 3524: 3519: 3514: 3509: 3504: 3499: 3494: 3489: 3484: 3479: 3474: 3469: 3464: 3459: 3454: 3449: 3444: 3439: 3434: 3429: 3424: 3419: 3414: 3409: 3403: 3401: 3397: 3396: 3385: 3384: 3377: 3370: 3362: 3353: 3352: 3350: 3349: 3337: 3334: 3333: 3331: 3330: 3325: 3320: 3315: 3309: 3307: 3303: 3302: 3300: 3299: 3294: 3289: 3284: 3279: 3274: 3268: 3266: 3260: 3259: 3257: 3256: 3250: 3248: 3244: 3243: 3241: 3240: 3235: 3230: 3224: 3222: 3216: 3215: 3213: 3212: 3207: 3201: 3199: 3197:Shell builtins 3193: 3192: 3190: 3189: 3184: 3179: 3174: 3169: 3164: 3159: 3154: 3149: 3144: 3139: 3134: 3129: 3124: 3119: 3114: 3108: 3106: 3102: 3101: 3099: 3098: 3093: 3087: 3085: 3081: 3080: 3078: 3077: 3072: 3066: 3064: 3060: 3059: 3057: 3056: 3051: 3046: 3041: 3036: 3031: 3026: 3021: 3016: 3011: 3006: 3001: 2996: 2991: 2986: 2980: 2978: 2974: 2973: 2970:shell builtins 2959: 2958: 2951: 2944: 2936: 2927: 2926: 2924: 2923: 2911: 2910: 2909: 2904: 2888: 2885: 2884: 2882: 2881: 2879:true and false 2876: 2871: 2866: 2861: 2856: 2851: 2845: 2843: 2839: 2838: 2836: 2835: 2830: 2825: 2820: 2815: 2810: 2805: 2799: 2797: 2791: 2790: 2788: 2787: 2781: 2779: 2775: 2774: 2772: 2771: 2766: 2760: 2758: 2754: 2753: 2751: 2750: 2745: 2740: 2735: 2730: 2725: 2719: 2717: 2715:Shell builtins 2711: 2710: 2708: 2707: 2702: 2697: 2692: 2687: 2682: 2677: 2672: 2667: 2662: 2657: 2652: 2647: 2642: 2637: 2632: 2627: 2622: 2617: 2612: 2607: 2602: 2597: 2592: 2587: 2582: 2577: 2572: 2567: 2562: 2556: 2554: 2550: 2549: 2547: 2546: 2541: 2536: 2531: 2526: 2521: 2516: 2511: 2506: 2500: 2498: 2494: 2493: 2491: 2490: 2485: 2480: 2475: 2470: 2465: 2460: 2455: 2449: 2447: 2443: 2442: 2440: 2439: 2434: 2429: 2424: 2419: 2414: 2409: 2404: 2399: 2394: 2389: 2384: 2379: 2374: 2369: 2364: 2359: 2354: 2349: 2344: 2339: 2334: 2329: 2324: 2319: 2314: 2308: 2306: 2302: 2301: 2298:shell builtins 2287: 2286: 2279: 2272: 2264: 2258: 2257: 2252: 2235: 2221: 2203: 2192: 2191:External links 2189: 2188: 2187: 2182:978-0470113851 2181: 2164: 2159:978-1593273897 2158: 2139: 2136: 2133: 2132: 2108:Korn, David G. 2098: 2073: 2040: 2026: 2008: 1994:McIlroy, M. D. 1985: 1966: 1965: 1963: 1960: 1959: 1958: 1953: 1948: 1943: 1936: 1933: 1923: 1920: 1907: 1906:Sort in random 1904: 1882: 1872: 1869: 1849:$ '\t' 1843: 1825: 1822: 1796: 1793: 1790: 1750: 1724: 1706: 1703: 1681: 1658: 1636: 1633: 1618: 1575: 1555: 1554:Sort by number 1552: 1534:sortphonebook 1530: 1507: 1504: 1501: 1499: 1496: 1493: 1492: 1489: 1486: 1483: 1480: 1477: 1474: 1471: 1468: 1462: 1461: 1458: 1455: 1452: 1449: 1446: 1443: 1440: 1437: 1431: 1430: 1427: 1424: 1421: 1418: 1415: 1412: 1409: 1406: 1400: 1399: 1396: 1393: 1390: 1387: 1384: 1381: 1378: 1375: 1369: 1368: 1365: 1362: 1359: 1356: 1353: 1350: 1347: 1344: 1338: 1337: 1334: 1331: 1328: 1325: 1322: 1319: 1316: 1313: 1307: 1306: 1303: 1300: 1297: 1294: 1291: 1288: 1285: 1282: 1271: 1270: 1267: 1264: 1261: 1258: 1255: 1252: 1249: 1246: 1240: 1239: 1236: 1233: 1230: 1227: 1224: 1221: 1218: 1215: 1213:--version-sort 1204: 1203: 1200: 1197: 1194: 1191: 1188: 1185: 1182: 1179: 1168: 1167: 1164: 1161: 1158: 1155: 1152: 1149: 1146: 1139: 1122: 1121: 1118: 1115: 1112: 1109: 1106: 1103: 1100: 1093: 1076: 1075: 1072: 1069: 1066: 1063: 1060: 1057: 1054: 1051: 1045: 1044: 1041: 1038: 1035: 1032: 1029: 1026: 1023: 1016: 1011:--buffer-size= 999: 998: 995: 992: 989: 986: 983: 980: 977: 974: 968: 967: 964: 961: 958: 955: 952: 949: 946: 940: 924: 923: 920: 917: 914: 911: 908: 905: 902: 899: 888: 887: 884: 881: 878: 875: 872: 869: 866: 859: 850: 849: 846: 843: 840: 837: 834: 831: 828: 825: 823:--sort=numeric 818:--numeric-sort 809: 808: 805: 802: 799: 796: 793: 790: 787: 784: 768: 767: 764: 761: 758: 755: 752: 749: 746: 743: 737: 736: 733: 730: 727: 724: 721: 718: 715: 704: 690: 689: 686: 683: 680: 677: 674: 671: 668: 665: 654: 653: 650: 647: 644: 641: 638: 635: 632: 629: 613: 612: 609: 606: 603: 600: 597: 594: 591: 588: 570: 569: 566: 563: 560: 557: 554: 551: 548: 545: 534: 533: 530: 527: 524: 521: 518: 515: 512: 509: 498: 497: 494: 491: 488: 485: 482: 479: 476: 473: 467: 466: 463: 460: 457: 454: 451: 448: 445: 442: 436: 435: 432: 429: 426: 423: 420: 417: 414: 411: 400: 399: 394: 389: 384: 379: 374: 369: 364: 361: 354: 351: 347:standard input 329: 327: 324: 305:MSX-DOS2 Tools 272:standard input 248:Version 1 Unix 235: 232: 217:listed in its 198:is a standard 186: 185: 171: 165: 164: 159: 153: 152: 150:Cross-platform 147: 141: 140: 107: 101: 100: 95: 91: 90: 77: 73: 72: 61: 55: 54: 44: 38: 37: 30: 15: 9: 6: 4: 3: 2: 3988: 3977: 3974: 3972: 3969: 3967: 3964: 3962: 3959: 3957: 3954: 3952: 3949: 3947: 3944: 3943: 3941: 3926: 3923: 3921: 3918: 3916: 3913: 3911: 3908: 3906: 3903: 3901: 3898: 3896: 3893: 3891: 3888: 3886: 3883: 3881: 3878: 3876: 3873: 3871: 3868: 3866: 3863: 3861: 3858: 3855: 3853: 3850: 3848: 3845: 3843: 3840: 3838: 3835: 3833: 3830: 3828: 3825: 3823: 3820: 3818: 3815: 3813: 3810: 3808: 3805: 3803: 3800: 3798: 3795: 3793: 3790: 3788: 3785: 3783: 3780: 3778: 3775: 3773: 3770: 3768: 3765: 3763: 3760: 3758: 3755: 3753: 3750: 3748: 3745: 3743: 3740: 3738: 3735: 3733: 3730: 3728: 3725: 3723: 3720: 3718: 3715: 3714: 3712: 3708: 3702: 3699: 3697: 3694: 3692: 3689: 3687: 3684: 3682: 3679: 3677: 3674: 3671: 3669: 3666: 3664: 3661: 3659: 3656: 3654: 3651: 3649: 3646: 3644: 3641: 3639: 3636: 3634: 3631: 3629: 3626: 3624: 3621: 3619: 3616: 3614: 3611: 3609: 3606: 3604: 3601: 3599: 3596: 3594: 3591: 3589: 3586: 3584: 3581: 3579: 3576: 3574: 3571: 3569: 3566: 3564: 3561: 3559: 3556: 3554: 3551: 3549: 3546: 3545: 3543: 3539: 3533: 3530: 3528: 3525: 3523: 3520: 3518: 3515: 3513: 3510: 3508: 3505: 3503: 3500: 3498: 3495: 3493: 3490: 3488: 3485: 3483: 3480: 3478: 3475: 3473: 3470: 3468: 3465: 3463: 3460: 3458: 3455: 3453: 3450: 3448: 3445: 3443: 3440: 3438: 3435: 3433: 3430: 3428: 3425: 3423: 3420: 3418: 3415: 3413: 3410: 3408: 3405: 3404: 3402: 3398: 3393: 3390: 3383: 3378: 3376: 3371: 3369: 3364: 3363: 3360: 3348: 3339: 3338: 3335: 3329: 3326: 3324: 3321: 3319: 3316: 3314: 3311: 3310: 3308: 3306:Miscellaneous 3304: 3298: 3295: 3293: 3290: 3288: 3285: 3283: 3280: 3278: 3275: 3273: 3270: 3269: 3267: 3265: 3261: 3255: 3252: 3251: 3249: 3245: 3239: 3236: 3234: 3231: 3229: 3226: 3225: 3223: 3221: 3217: 3211: 3208: 3206: 3203: 3202: 3200: 3198: 3194: 3188: 3185: 3183: 3180: 3178: 3175: 3173: 3170: 3168: 3165: 3163: 3160: 3158: 3155: 3153: 3150: 3148: 3145: 3143: 3140: 3138: 3135: 3133: 3130: 3128: 3125: 3123: 3120: 3118: 3115: 3113: 3110: 3109: 3107: 3103: 3097: 3094: 3092: 3089: 3088: 3086: 3082: 3076: 3073: 3071: 3068: 3067: 3065: 3061: 3055: 3052: 3050: 3047: 3045: 3042: 3040: 3037: 3035: 3032: 3030: 3027: 3025: 3022: 3020: 3017: 3015: 3012: 3010: 3007: 3005: 3002: 3000: 2997: 2995: 2992: 2990: 2987: 2985: 2982: 2981: 2979: 2975: 2971: 2968:programs and 2967: 2964: 2957: 2952: 2950: 2945: 2943: 2938: 2937: 2934: 2922: 2921: 2912: 2908: 2905: 2903: 2900: 2899: 2898: 2890: 2889: 2886: 2880: 2877: 2875: 2872: 2870: 2867: 2865: 2862: 2860: 2857: 2855: 2852: 2850: 2847: 2846: 2844: 2842:Miscellaneous 2840: 2834: 2831: 2829: 2826: 2824: 2821: 2819: 2816: 2814: 2811: 2809: 2806: 2804: 2801: 2800: 2798: 2796: 2792: 2786: 2783: 2782: 2780: 2778:Documentation 2776: 2770: 2767: 2765: 2762: 2761: 2759: 2755: 2749: 2746: 2744: 2741: 2739: 2736: 2734: 2731: 2729: 2726: 2724: 2721: 2720: 2718: 2716: 2712: 2706: 2703: 2701: 2698: 2696: 2693: 2691: 2688: 2686: 2683: 2681: 2678: 2676: 2673: 2671: 2668: 2666: 2663: 2661: 2658: 2656: 2653: 2651: 2648: 2646: 2643: 2641: 2638: 2636: 2633: 2631: 2628: 2626: 2623: 2621: 2618: 2616: 2613: 2611: 2608: 2606: 2603: 2601: 2598: 2596: 2593: 2591: 2588: 2586: 2583: 2581: 2578: 2576: 2573: 2571: 2568: 2566: 2563: 2561: 2558: 2557: 2555: 2551: 2545: 2542: 2540: 2537: 2535: 2532: 2530: 2527: 2525: 2522: 2520: 2517: 2515: 2512: 2510: 2507: 2505: 2502: 2501: 2499: 2495: 2489: 2486: 2484: 2481: 2479: 2476: 2474: 2471: 2469: 2466: 2464: 2461: 2459: 2456: 2454: 2451: 2450: 2448: 2444: 2438: 2435: 2433: 2430: 2428: 2425: 2423: 2420: 2418: 2415: 2413: 2410: 2408: 2405: 2403: 2400: 2398: 2395: 2393: 2390: 2388: 2385: 2383: 2380: 2378: 2375: 2373: 2370: 2368: 2365: 2363: 2360: 2358: 2355: 2353: 2350: 2348: 2345: 2343: 2340: 2338: 2335: 2333: 2330: 2328: 2325: 2323: 2320: 2318: 2315: 2313: 2310: 2309: 2307: 2303: 2299: 2296:programs and 2295: 2292: 2285: 2280: 2278: 2273: 2271: 2266: 2265: 2262: 2256: 2253: 2251: 2247: 2244: β€“  2241: 2236: 2233: 2230: β€“  2227: 2222: 2219: 2215: 2212: β€“  2209: 2204: 2202: 2198: 2195: 2194: 2184: 2178: 2174: 2170: 2165: 2161: 2155: 2151: 2147: 2142: 2141: 2129: 2117: 2113: 2109: 2102: 2095: 2083: 2077: 2063: 2062: 2054: 2050: 2044: 2036: 2030: 2022: 2021:linux.die.net 2018: 2012: 2001: 2000: 1995: 1989: 1981: 1977: 1971: 1967: 1957: 1954: 1952: 1949: 1947: 1944: 1942: 1939: 1938: 1932: 1919: 1917: 1880: 1841: 1839: 1835: 1834:tab character 1831: 1789: 1722: 1656: 1616: 1613: 1603: 1573: 1566: 1511:catphonebook 1490: 1487: 1484: 1481: 1478: 1475: 1472: 1469: 1464: 1463: 1459: 1456: 1453: 1450: 1447: 1444: 1441: 1438: 1433: 1432: 1428: 1425: 1422: 1419: 1416: 1413: 1410: 1407: 1402: 1401: 1397: 1394: 1391: 1388: 1385: 1382: 1379: 1376: 1371: 1370: 1366: 1363: 1360: 1357: 1354: 1351: 1348: 1345: 1340: 1339: 1335: 1332: 1329: 1326: 1323: 1320: 1317: 1314: 1309: 1308: 1304: 1301: 1298: 1295: 1292: 1289: 1286: 1283: 1273: 1272: 1268: 1265: 1262: 1259: 1256: 1253: 1250: 1247: 1242: 1241: 1237: 1234: 1231: 1228: 1225: 1222: 1219: 1216: 1206: 1205: 1201: 1198: 1195: 1192: 1189: 1186: 1183: 1180: 1170: 1169: 1165: 1162: 1159: 1156: 1153: 1150: 1147: 1144: 1140: 1138: 1130: 1124: 1123: 1119: 1116: 1113: 1110: 1107: 1104: 1101: 1098: 1094: 1092: 1084: 1078: 1077: 1073: 1070: 1067: 1064: 1061: 1058: 1055: 1052: 1047: 1046: 1042: 1039: 1036: 1033: 1030: 1027: 1024: 1021: 1017: 1015: 1007: 1001: 1000: 996: 993: 990: 987: 984: 981: 978: 975: 970: 969: 965: 962: 959: 956: 953: 950: 947: 945: 941: 938:--sort=random 933:--random-sort 926: 925: 921: 918: 915: 912: 909: 906: 903: 900: 890: 889: 885: 882: 879: 876: 873: 870: 867: 864: 860: 858: 852: 851: 847: 844: 841: 838: 835: 832: 829: 826: 811: 810: 806: 803: 800: 797: 794: 791: 788: 785: 770: 769: 765: 762: 759: 756: 753: 750: 747: 744: 739: 738: 734: 731: 728: 725: 722: 719: 716: 713: 709: 705: 703: 692: 691: 687: 684: 681: 678: 675: 672: 669: 666: 656: 655: 651: 648: 645: 642: 639: 636: 633: 630: 615: 614: 610: 607: 604: 601: 598: 595: 592: 589: 572: 571: 567: 564: 561: 558: 555: 552: 549: 546: 543:--ignore-case 536: 535: 531: 528: 525: 522: 519: 516: 513: 510: 500: 499: 495: 492: 489: 486: 483: 480: 477: 474: 469: 468: 464: 461: 458: 455: 452: 449: 446: 443: 438: 437: 433: 430: 427: 424: 421: 418: 415: 412: 402: 401: 398: 395: 393: 390: 388: 385: 383: 380: 378: 375: 373: 370: 368: 365: 362: 359: 358: 350: 348: 330:sort ... ... 323: 321: 312: 310: 306: 302: 293: 291: 287: 284: 275: 273: 269: 265: 261: 257: 253: 249: 245: 231: 225: 220: 219:argument list 216: 212: 209: 205: 201: 197: 193: 184: 179: 175: 172: 170: 166: 163: 160: 158: 154: 151: 148: 146: 142: 139: 135: 131: 127: 123: 119: 115: 111: 108: 106: 102: 99: 96: 92: 78: 74: 70: 66: 62: 60: 56: 52: 48: 45: 43: 39: 28: 23: 3657: 3151: 2918: 2896: 2664: 2168: 2145: 2127: 2120:. Retrieved 2101: 2093: 2086:. Retrieved 2076: 2065:. Retrieved 2059: 2043: 2029: 2020: 2011: 1998: 1988: 1979: 1970: 1925: 1909: 1874: 1827: 1775: 1708: 1638: 1598: 1557: 1142: 1136: 1128: 1096: 1090: 1082: 1019: 1013: 1005: 862: 856: 782:--sort=month 777:--month-sort 711: 707: 701: 363:Description 332: 313: 304: 294: 276: 252:Ken Thompson 237: 200:command line 195: 189: 59:Developer(s) 47:Ken Thompson 3400:File system 3228:ip/ipconfig 2977:File system 2305:File system 1900:Adam 12345 1897:Wendy 23456 1894:Bob 34567 1891:Sam 45678 1888:Joe 56789 1847:sort-k2,2-t 1832:requires a 1809:Wendy|23456 1802:'|' 1699:Joe 56789 1696:Sam 45678 1693:Bob 34567 1690:Wendy 23456 1687:Adam 12345 1676:Wendy 23456 1673:Sam 45678 1670:Joe 56789 1667:Bob 34567 1664:Adam 12345 1662:catzipcode 311:version 2. 292:algorithm. 281:bundled in 202:program of 183:MIT License 65:open-source 3940:Categories 3220:Networking 2897:Categories 2088:1 February 2067:2020-09-05 1962:References 1851:phonebook 1806:Adam|12345 1622:find.-name 353:Parameters 337:, or when 290:merge sort 94:Written in 86:1971-11-03 71:developers 69:commercial 3452:dircolors 3247:Searching 3063:Processes 2757:Searching 2446:Processes 1941:Collation 1818:Bob|34567 1815:Joe|56789 1812:Sam|45678 1771:fred 2000 1765:chad 1000 1739:chad 1000 1730:fred 2000 1728:catquota 1630:sort-k7n 1342:--version 897:--reverse 286:coreutils 268:Version 5 260:Version 4 208:Unix-like 192:computing 174:coreutils 118:Unix-like 3837:readlink 3822:printenv 3722:basename 3691:unexpand 3527:truncate 3497:realpath 3394:programs 3347:Category 3117:basename 2565:basename 2116:Archived 1996:(1987). 1935:See also 1804:zipcode 1768:don 1500 1762:bob 1000 1756:eric 500 1745:eric 500 1742:don 1500 1733:bob 1000 1639:Use the 1579:du/bin/* 1498:Examples 1177:--unique 333:With no 181:Plan 9: 145:Platform 63:Various 3880:timeout 3812:pathchk 3792:logname 3737:dirname 3648:sha1sum 3457:install 3323:fortune 3238:netstat 3233:ip/ping 3162:strings 2670:strings 2590:dirname 2514:logname 2463:crontab 2246:Inferno 2240:sort(1) 2226:sort(1) 2208:sort(1) 2201:manpage 2122:3 March 1759:an 1000 1736:an 1000 1583:sort-n 392:MSX-DOS 382:FreeBSD 377:Inferno 309:MSX-DOS 244:Multics 234:History 169:License 162:Command 134:MSX-DOS 130:Inferno 110:Multics 84: ( 35:command 3920:whoami 3905:uptime 3900:unlink 3860:stdbuf 3842:runcon 3827:printf 3777:hostid 3772:groups 3762:factor 3727:chroot 3623:numfmt 3613:md5sum 3588:expand 3578:csplit 3558:base64 3553:base32 3487:mktemp 3477:mkfifo 3345:  3091:passwd 2963:Plan 9 2650:printf 2575:csplit 2317:chattr 2250:Manual 2232:Plan 9 2218:Manual 2179:  2156:  1778:-k2,2n 1711:-k m,n 1311:--help 863:OUTPUT 857:OUTPUT 699:--key= 372:Plan 9 326:Syntax 178:GPLv3+ 126:Plan 9 3910:users 3895:uname 3852:sleep 3817:pinky 3807:nproc 3802:nohup 3767:false 3686:tsort 3663:split 3633:paste 3568:cksum 3548:b2sum 3522:touch 3512:shred 3507:rmdir 3482:mknod 3472:mkdir 3427:cksum 3422:chgrp 3417:chown 3412:chmod 3407:chcon 3328:sleep 3292:strip 3177:troff 3157:spell 3054:touch 3044:split 3029:mkdir 2989:chgrp 2984:chmod 2874:sleep 2828:strip 2808:ctags 2743:unset 2723:alias 2705:xargs 2685:troff 2645:patch 2640:paste 2615:iconv 2544:write 2534:uname 2437:umask 2427:touch 2417:split 2412:rmdir 2387:mkdir 2372:fuser 2337:cksum 2332:chgrp 2327:chown 2322:chmod 2216:User 2214:Linux 2056:(PDF) 2003:(PDF) 1786:-k1,1 1612:LaTeX 1141:Uses 1095:Uses 861:Uses 397:IBM i 387:Linux 360:Name 320:IBM i 301:ASCII 264:pipes 258:. By 215:files 138:IBM i 3885:true 3875:test 3865:stty 3856:stat 3797:nice 3787:link 3757:expr 3747:echo 3732:date 3717:arch 3696:uniq 3676:tail 3658:sort 3653:shuf 3608:join 3603:head 3598:fold 3573:comm 3532:vdir 3517:sync 3297:yacc 3254:grep 3210:test 3205:echo 3182:uniq 3167:tail 3152:sort 3142:join 3127:diff 3122:comm 3070:kill 3019:gzip 3014:file 2920:List 2859:expr 2833:yacc 2818:make 2769:grep 2764:find 2748:wait 2738:test 2733:echo 2690:uniq 2675:tail 2665:sort 2655:read 2630:more 2620:join 2610:head 2605:fold 2585:diff 2570:comm 2529:tput 2524:talk 2519:mesg 2509:exit 2488:time 2478:nice 2473:kill 2432:type 2367:file 2291:Unix 2177:ISBN 2154:ISBN 2124:2015 2090:2013 1956:shuf 1951:uniq 1916:shuf 1875:The 1709:The 1645:-k 2 1602:find 1599:The 1570:sort 1558:The 1488:Yes 1457:Yes 1426:Yes 1395:Yes 1361:Yes 1358:Yes 1330:Yes 1327:Yes 1299:Yes 1296:Yes 1254:Yes 1232:Yes 1229:Yes 1202:Yes 1196:Yes 1193:Yes 1187:Yes 1160:Yes 1157:Yes 1151:Yes 1114:Yes 1111:Yes 1097:char 1091:char 1083:char 1074:Yes 1068:Yes 1059:Yes 1034:Yes 1020:size 1018:Use 1014:size 1006:size 991:Yes 988:Yes 960:Yes 957:Yes 948:Yes 944:shuf 922:Yes 916:Yes 913:Yes 910:Yes 907:Yes 904:Yes 886:Yes 880:Yes 877:Yes 871:Yes 848:Yes 842:Yes 839:Yes 836:Yes 833:Yes 830:Yes 801:Yes 798:Yes 792:Yes 789:Yes 766:Yes 760:Yes 757:Yes 751:Yes 729:Yes 726:Yes 712:POS2 708:POS1 702:POS1 688:Yes 682:Yes 679:Yes 673:Yes 670:Yes 646:Yes 643:Yes 634:Yes 605:Yes 602:Yes 596:Yes 593:Yes 568:Yes 562:Yes 559:Yes 553:Yes 550:Yes 532:Yes 526:Yes 523:Yes 517:Yes 514:Yes 490:Yes 487:Yes 465:Yes 459:Yes 456:Yes 450:Yes 434:Yes 428:Yes 425:Yes 419:Yes 416:Yes 367:Unix 339:FILE 335:FILE 316:sort 314:The 307:for 297:sort 279:sort 240:sort 206:and 204:Unix 196:sort 157:Type 114:Unix 67:and 33:sort 31:The 20:sort 3925:yes 3915:who 3890:tty 3870:tee 3847:seq 3832:pwd 3752:env 3672:tac 3668:sum 3638:ptx 3593:fmt 3583:cut 3563:cat 3447:dir 3318:cal 3282:lex 3277:hoc 3147:sed 3137:eqn 3112:awk 3096:who 3049:tee 3034:pwd 2994:cmp 2854:cal 2813:lex 2785:man 2660:sed 2580:cut 2560:awk 2539:who 2504:env 2422:tee 2402:pwd 2397:pax 2342:cmp 2312:cat 2061:IBM 2049:IBM 1884:$ 1845:$ 1798:$ 1782:-k2 1752:$ 1726:$ 1721:): 1683:$ 1660:$ 1626:-ls 1620:$ 1577:$ 1532:$ 1509:$ 1491:No 1485:No 1482:No 1479:No 1476:No 1473:No 1460:No 1454:No 1451:No 1448:No 1445:No 1442:No 1429:No 1423:No 1420:No 1417:No 1414:No 1411:No 1398:No 1392:No 1389:No 1386:No 1383:No 1380:No 1367:No 1364:No 1355:No 1352:No 1349:No 1336:No 1333:No 1324:No 1321:No 1318:No 1305:No 1302:No 1293:No 1290:No 1287:No 1269:No 1266:No 1263:No 1260:No 1257:No 1251:No 1238:No 1235:No 1226:No 1223:No 1220:No 1199:No 1190:No 1184:No 1166:No 1163:No 1154:No 1148:No 1143:dir 1137:dir 1129:dir 1120:No 1117:No 1108:No 1105:No 1102:No 1071:No 1065:No 1062:No 1056:No 1049:-tx 1043:No 1040:No 1037:No 1031:No 1028:No 1025:No 997:No 994:No 985:No 982:No 979:No 966:No 963:No 954:No 951:No 919:No 883:No 874:No 868:No 845:No 807:No 804:No 795:No 763:No 754:No 748:No 735:No 732:No 723:No 720:No 717:No 685:No 676:No 652:No 649:No 640:No 637:No 611:No 608:No 599:No 565:No 556:No 529:No 520:No 496:No 493:No 484:No 481:No 478:No 462:No 453:No 447:No 431:No 422:No 341:is 303:'s 283:GNU 254:at 190:In 3942:: 3782:id 3742:du 3701:wc 3681:tr 3643:pr 3628:od 3618:nl 3502:rm 3492:mv 3467:ls 3462:ln 3442:df 3437:dd 3432:cp 3313:bc 3287:nm 3272:ar 3187:wc 3172:tr 3132:ed 3075:ps 3039:rm 3024:ls 3009:du 3004:dd 2999:cp 2869:od 2864:lp 2849:bc 2823:nm 2803:ar 2728:cd 2700:wc 2695:vi 2680:tr 2635:nl 2625:m4 2600:ex 2595:ed 2483:ps 2468:fg 2458:bg 2453:at 2407:rm 2392:mv 2382:ls 2377:ln 2362:df 2357:du 2352:dd 2347:cp 2175:. 2171:. 2152:. 2148:. 2126:. 2114:. 2092:. 2058:. 2051:. 2019:. 1978:. 1918:. 1877:-r 1840:. 1653:+2 1649:+1 1641:-k 1607:ls 1565:du 1560:-n 1466:/H 1435:/A 1404:/S 1373:/R 1275:-z 1244:-w 1208:-V 1172:-u 1126:-T 1080:-t 1003:-S 972:-s 928:-R 892:-r 854:-o 813:-n 772:-M 741:-m 694:-k 658:-i 617:-h 574:-g 538:-f 502:-d 471:-C 440:-c 404:-b 349:. 274:. 238:A 228:-r 194:, 176:: 136:, 132:, 128:, 124:, 120:, 116:, 112:, 3381:e 3374:t 3367:v 2955:e 2948:t 2941:v 2283:e 2276:t 2269:v 2185:. 2162:. 2070:. 2023:. 1982:. 1719:n 1715:m 1628:| 1581:| 1277:, 1210:, 1174:, 1131:, 1085:, 1008:, 935:, 930:, 894:, 820:, 815:, 779:, 774:, 696:, 660:, 624:, 619:, 581:, 576:, 540:, 504:, 406:, 343:- 122:V 98:C 88:) 53:) 49:(

Index


Original author(s)
Ken Thompson
AT&T Bell Laboratories
Developer(s)
open-source
commercial
C
Operating system
Multics
Unix
Unix-like
V
Plan 9
Inferno
MSX-DOS
IBM i
Platform
Cross-platform
Type
Command
License
coreutils
GPLv3+
MIT License
computing
command line
Unix
Unix-like
operating systems

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.

↑