linux - tcl : lsort -dictionary replace new lines by spaces -


i use following command sort content of string

set local_object [lsort -dictionary $list_object]  

this comand replace new lines spaces

how avoid ?

lsort assumes argument tcl list. whitespace including newlines can separate elements of list, not preserved in output. if want format output list 1 element per line do:

set local_object [join [lsort -dictionary $list_object] "\n"] 

Comments