Questions tagged [tcl]
59 questions
1
vote
2 answers
Unix command does not work in Tcl script
I'm new to Tcl and UNIX programming.
The following command works on the UNIX command-lines, but doesn't work in a Tcl script.
$ sort -b -k8 abc.txt | awk '!a[$1]++'
error out for 8 (-k8) and 1($1) is not variable
I'm trying to sort on Column 8…

user120451
- 11
1
vote
1 answer
Improving performance of numerical loops in tcl
I'm trying to improve the performance of a Tcl script. It is a simple random sample with replacement algorithm. I know it's better to do this in a more numerically orientated language, but the platform I'm in uses Tcl.
Here is the code I…

Jonjilla
- 113
0
votes
1 answer
how to convert a list to array in tcl?
It may be a trivial question; but I am facing problem to covert a list to array inside a tcl script.
set mylist { one two three four five }
I need to convert this to array myArr.
One more doubt, Can we use list elements as separate, like I want to…
-1
votes
1 answer
How to get index value from list in tcl?
I have following set of keywords
set keywords {a b c d}. I want to print index value of c. How to do this in tcl?

Sagar Shahabade
- 35
- 3