Talk:Sort (Unix)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computing (Rated Stub-class)
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Stub-Class article Stub  This article has been rated as Stub-Class on the project's quality scale.
 ???  This article has not yet received a rating on the project's importance scale.
Note icon
This article has been automatically rated by a bot or other tool as Stub-Class because it uses a stub template. Please ensure the assessment is correct before removing the |auto= parameter.

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

A question like that, not directly related to the content of the article is better asked to your computer - if it's Unix, try "man ls". If Windows, "start --> Help and support". Or you may try the many help Usenet forums online. --Unixguy 15:14, 26 November 2006 (UTC)

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:

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");}'`

Lent (talk) 17:38, 1 February 2013 (UTC)

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 (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)