sort

(redirected from sorts)
Also found in: Dictionary, Thesaurus, Medical, Legal, Acronyms, Idioms.

sort

[sȯrt]
(computer science)
To rearrange a set of data items into a new sequence, governed by specific rules of precedence.
The program designed to perform this activity.

sort

(application, algorithm)
To arrange a collection of items in some specified order. The items - records in a file or data structures in memory - consist of one or more fields or members. One of these fields is designated as the "sort key" which means the records will be ordered according to the value of that field. Sometimes a sequence of key fields is specified such that if all earlier keys are equal then the later keys will be compared. Within each field some ordering is imposed, e.g. ascending or descending numerical, lexical ordering, or date.

Sorting is the subject of a great deal of study since it is a common operation which can consume a lot of computer time. There are many well-known sorting algorithms with different time and space behaviour and programming complexity.

Examples are quicksort, insertion sort, bubble sort, heap sort, and tree sort. These employ many different data structures to store sorted data, such as arrays, linked lists, and binary trees.

sort

(tool)
The Unix utility program for sorting lines of files.

Unix manual page: sort(1).

sort

(1) To reorder data into a new sequence. See sorter, counting sort, bubble sort, quick sort and selection sort.


A Punch Card Sorter in 1917
Cards were sorted one digit at a time (a 10-digit account number required 10 passes). A great year to have bought stock. (Image courtesy of IBM.)






(2) An external DOS/Windows command that sorts a text file into alphabetical order, providing the text columns are uniform. The following example sorts the text file 1.TXT (starting at character position 1), creating 2.TXT. The < means "input from," and the > means "output to."
sort < 1.txt > 2.txt      a to z
  sort < 1.txt > 2.txt /r   z to a


SORT ON A MIDDLE COLUMN
If city begins in character position 60 in 1.TXT, the following examples create 2.TXT in city sequence:
sort /+60 < 1.txt > 2.txt      a to z
  sort /+60 < 1.txt > 2.txt /r   z to a
References in classic literature ?
Nor may they imitate the neighing of horses, the bellowing of bulls, the murmur of rivers and roll of the ocean, thunder, and all that sort of thing?
It is important not to confuse the two forms of memory which Bergson distinguishes in the second chapter of his "Matter and Memory," namely the sort that consists of habit, and the sort that consists of independent recollection.
The excellent young men on the staff, though willing to help me, belonged to a sphere of the white colony for which that sort of Johnson does not exist.
A silence deferential, but full of reserves, reigned for a moment, and then the great lady exclaimed, not with resentment, but with a sort of protesting indignation:
The house is very old--probably the first house of some sort that stood there was in the time of the Romans.
I have a sort of hobby about what they call 'phenomena of phosphorescence.
I knew, just as sure as I was standing there on one leg, that this was the sort of girl who would have me and Gentleman out of that house about three seconds after the clergyman had tied the knot.
Cadwallader, "there is a new face come out from behind that broad man queerer than any of them: a little round head with bulging eyes--a sort of frog-face--do look.
As a sort of atonement she wrote 'Day after Day,' the story of a dismal and joyless orphan, who dies to the sound of angelic music, faint and farheard, filling the whole chamber.
HE had a sort of an idea that I had been brought up from infancy with Hamilton Fynes and could answer a sheaf of questions a yard long.
Mysterious sort of fellow, Thomson," Major Harrison continued, in blissful ignorance of the peculiar significance of his words.
He found himself wondering, in an impersonal sort of way, that these things should so little affect him.