This article is rated Stub-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||
|
Question on sorting a directory edit
If anyone can tell me that "How can sort a directory by the size of the files?" Regards, Chouhan
Sort article - format and content edit
I went ahead and added the requested example of sorting files by size to the article. I'd say that the format of the article isn't like other Unix commands, like file, for example. Also the content can be added to and improved upon. I'll see if I can do that later. --Unixguy 15:30, 26 November 2006 (UTC)
TSV (Tab Separated Values) edit
The $'\t' is a nicer way of specifying than embedding a tab into a shell script. And some of the escaping methods fail, resulting in this fun message from sort:
sort: multi-character tab `\\t'
A nice article is: http://blog.jasoncust.com/2011/12/bash-sort-what-hell-is-up-with-tabs.html
I added two citations to sources for bash and Korn Shell. Admittedly, the escaping syntax will fail in csh and tcsh with:
csh % sort -t $'\t'
Illegal variable name.
csh %
CSH and older shells can use code like:
$ sort -t"`/bin/echo '\t'`"
or this:
$ sort -t `awk 'BEGIN{printf("\t");}'`
Sorting algorithm across Unixes edit
It might be beneficial to list the different sorting algrothithms used by different implementations (for instance, BSD sort not just GNU sort...) — Preceding unsigned comment added by 96.2.125.52 (talk) 15:47, 14 January 2015 (UTC)
Conflict with Quicksort edit
The page indicates that mergesort is the implementation for this, but according to the quicksort page, it is the Unix implementation. Needs citation? --ManOminous (talk) 18:36, 21 January 2015 (UTC)
example wrong? edit
Could this example be wrong? I would expect Bob to be ranked third. And I wonder about the syntactic meaning of the second "," in "-k2,2," --Utonsal (talk) 11:39, 26 March 2024 (UTC)