Name

lsort

lsort [options] list

Sort the elements of list list and return the resulting list.

Options

-ascii

Sort by ASCII collation order (default).

-dictionary

Sort using dictionary order (case insensitive, compare numbers as integers).

-integer

Compare elements as integer numbers.

-real

Compare elements as floating-point numbers.

-command command

Compare using a command that must return <0, 0, or >0.

-increasing

Sort in increasing order (default).

-decreasing

Sort in decreasing order.

-index index

Sort a list of lists based on the values with index index in each sublist.

Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.