Hello,
I have a list that I want to sort, but I can't get it right.
The pckt-array has a timestamp and a value on each line and is sorted by the timestamp.
set pcktlst ""
foreach {name value} [array get pckt] {
lappend pcktlst $name $value
}
set pcktlst [lsort -integer -index 0 $pcktlst]
#now the $name should be deleted out of the list so that only the values remain.
So I'd like to have a pcktlst with only the values, in the same order they appear in the pckt-array.
How can I get that?
thx
I have a list that I want to sort, but I can't get it right.
The pckt-array has a timestamp and a value on each line and is sorted by the timestamp.
set pcktlst ""
foreach {name value} [array get pckt] {
lappend pcktlst $name $value
}
set pcktlst [lsort -integer -index 0 $pcktlst]
#now the $name should be deleted out of the list so that only the values remain.
So I'd like to have a pcktlst with only the values, in the same order they appear in the pckt-array.
How can I get that?
thx