The syntax for sorting a list is

lsort listname

Example:

set var {orange blue red green}
set var [lsort $var]
puts $var

Result:

blue green orange red

Discover more from Tips and Hints for Aerospace Engineers

Subscribe now to keep reading and get access to the full archive.

Continue reading