Questions tagged [tcl]

Tool Command Language was invented by John Ousterhout as a way to make it easy to write little languages for configuring EDA tools, but it has grown far beyond those humble beginnings to become a general scripting language with built-in asynchronous I/O and Unicode strings while supporting paradigms such as object-oriented programming and coroutines.

Tool Command Language was invented by John Ousterhout as a way to make it easy to write little languages for configuring EDA tools, but it has grown far beyond those humble beginnings to become a general scripting language with built-in asynchronous I/O and Unicode strings while supporting paradigms such as object-oriented programming and coroutines. See the Wikipedia page for Tcl for more information.

The current recommended production release of Tcl is Tcl/Tk 8.6.13 (Nov 22, 2022).

Previous versions of the language are currently relatively common. Tcl 8.5 is widely deployed (current patch version 8.5.18). As is Tcl 8.4 in more conservative deployments (8.4.20 is current, but end-of-lifed there). Use of Tcl 8.4 or earlier is usually not recommended, as it does not receive security-fix support from the Tcl developers.

Naming

You may write the language name as either TCL or Tcl; practitioners tend to prefer the latter on the grounds that it means they don't have to hold the shift key down so long. For pronunciation purposes, either “tee cee ell” or “tickle” are acceptable, depending on audience.

Resources

Questions:

Books:

Websites:

7879 questions
2
votes
3 answers

Which package to require to use TCL dictionaries?

I am trying to use the Tcl dict data structure: http://www.tcl.tk/man/tcl/TclCmd/dict.htm But when I try to run my script, the script displays the following error: invalid command name "dict" I believe it is caused by my not including any Tcl…
czchlong
  • 2,434
  • 10
  • 51
  • 65
2
votes
4 answers

split a string variable through shell script

i have a string containing date and time as timestamp= 12-12-2012 16:45:00 I need to reformat it into timestamp= 16:45:00 12-12-2012 How to achieve this in shell script? Note Please : variable's value is 12-12-2012 16:45:00 and timestamp is the…
Astro - Amit
  • 767
  • 3
  • 15
  • 36
2
votes
2 answers

copying files in tcl

I have a query in "file copy" tcl command. I tried storing all my files to a list and used it in my command. But tcl is not recognizing those files. for example: Files are abc.log , foo.log , bar.log if these files are appended to a list say…
Nathan Pk
  • 709
  • 4
  • 18
  • 27
2
votes
1 answer

TCL des: Return encrypted phrase in standard ascii characters

I'm using DES in TCL to encrypt some phrases and I want to store those encrypted phrases in some ascii files which I need to manipulate easily. Therefore, I would like the "encrypted phrase" to be constituted only of standard ascii characters…
leandro
  • 175
  • 8
2
votes
2 answers

Extracting netmask from ifconfig output and printing it in CIDR format

I need to extract the netmask for two sets of IPs and print it in CIDR format, out on to the screen. Thinking of using either shell or tcl to do this. Guess the major sticky points here is converting the hexadecimal netmask into CIDR format. Tried…
egorulz
  • 1,455
  • 2
  • 17
  • 28
2
votes
1 answer

Running shell commands in background, in a tcl proc

I'm trying to create a tcl proc, which is passed a shell command as argument and then opens a temporary file and writes a formatted string to the temporary file, followed by running the shell command in background and storing the output to the temp…
div310
  • 43
  • 1
  • 4
2
votes
2 answers

Printing on screen the percentage completed while my tcl script is running?

I have a tcl script which takes a few minutes to run (the execution time varies based on different configurations). I want the users to have some kind of an idea of whether it's still executing and how long it would take to complete while the…
egorulz
  • 1,455
  • 2
  • 17
  • 28
2
votes
1 answer

Tcl - Free up memory in the middle of procedure

We have a web application which is running on AOLServer. One of the features we provide requires the application to process large amount of data which is stored in several ns_sets. The process includes five steps. What we noticed is that the memory…
gaojun1000
  • 69
  • 2
2
votes
1 answer

How to pass C++ unsigned char [] to to Tcl bytearray?

I have a Tcl procedure which magnifies an image. proc ShowWindow {wtitle zfactor imgdata} { puts stdout "Now in the Tcl procedure ShowWindow!"; image create photo idata -data $imgdata; # create a photo image from the input data image create…
2
votes
1 answer

Missing Symbols at link stage compiling under VS 2010

I'm attempting to build and fix UCL RAT for running on windows compiled with VS 2010. I've compiled TCL 8.5.12 successfully under Visual studio 2010 and the main RAT executable. RAT uses TCL to drive it's user interface. The problem arose when I…
2
votes
1 answer

Why mkdir cannot be called in tcl script envoked by git?

I want to develop custom git command using tcl. The choice of programming language was done considering ease of learning (as I thought) and availability (git ships with tcl). I want to create folder using tcl script. Normally I'm calling mkdir…
shytikov
  • 9,155
  • 8
  • 56
  • 103
2
votes
3 answers

Shell scripting to print list of elements

Is there any command in shell scripting which is similar to "list" in tcl? I want to write a list of elements to a file (each in separate line) .But, if the element matches a particular pattern then element next to it and the element itself should…
Nathan Pk
  • 709
  • 4
  • 18
  • 27
2
votes
1 answer

Java XmlRpc Client POST issue with TCL XMLRPC Server

I am having a simple problem, my Java XMLRPC Client cant seem to properly speak to the XMLRPC Server that is written in TCL (Using TCL XMLRPC SERVER OPEN SOURCE implementation) Summary: XMLRPC Clients in TCL/Python etc, can/do send/receive messages…
2
votes
1 answer

How to implement a semaphore that will synchronize several different copies of the same program in Linux

I have a program that can be ran several times. The program uses a working directory where it saves/manipulates its runtime files and puts results. I want to make sure that if several copies of the program run simultaneously, they won't use the same…
SIMEL
  • 8,745
  • 28
  • 84
  • 130
2
votes
1 answer

Creating arrays dynamically in Tcl

I am trying to populate an array dynamically rather than setting it manually by running a counter like below: set all_list { } set num_pc_a_b 10 for {set i 0 ;set j 0 ; set k 0} {$j < $num_pc_a_b} {incr j; incr i ;incr k} { array set…
Zuckerberg
  • 205
  • 6
  • 15
1 2 3
99
100