Questions tagged [tcl]
Tcl is a scripting programming language being popular for rapid prototyping and testing.
14 questions
1
vote
1
answer
110
views
Why do comments in loops behave differently than outside of loops?
This seems like really strange behavior for me in Tcl, or is this normal and I just don't understand how comments work?
This code runs just fine in Tcl:
#foreach corner {1 2} {
#if { $a } {
#}
OK,...
2
votes
1
answer
104
views
How to refer to proc's own namespace inside an uplevel context in Tcl?
Inside a Tcl proc, I need to refer to variables both in the context of this proc as well as the level above because the file that is getting sourced uses variables there. So I tried writing something ...
0
votes
1
answer
588
views
How to compile a custom Tcl/Tk 8.6.12 version for macOS Monterey to avoid using Homebrew
When I run gitk, Wish is displaying a broken/black window on macOS Monterey 12.6. broken Wish window
I read from this post that the Tcl/Tk version (8.5.9) shipped with macOS Monterey is broken and I ...
1
vote
1
answer
2k
views
Q: how to Get date of file in TCL/TK?
I have a file in linux:
-rw-r--r-- 1 quangt alphaa0 8170473 Apr 23 23:06 us_pd_syn_map.log
I want to get the date of the file : "Apr 23"
How do I get it?
1
vote
1
answer
661
views
How to run a linux cli tool, using wsl.exe, out off a Tcl/tk script in Windows 10?
For a hardware testing application, I have to run, and interact with, a couple of external cli applications, for example a Linux ping to a certain local IP address, from within a Tcl/Tk script.
In ...
0
votes
1
answer
241
views
Upgrading from Tcl 8.5 to 8.6 in NS2
I am currently writing a Tcl script for NS2 where things are added to a list via the lset x 0 end+1 $item command in Tcl. See below the below test script:
set x { {} {} {} }
set refID 1
proc addValue ...
1
vote
1
answer
847
views
TCL/Expect script with if/else logic based on host IP address
So I have been using and enjoying /usr/bin/expect for scripts because it can quickly log me into servers since it autocompletes my userid and password. Through some cursory reading, I've come to ...
0
votes
2
answers
701
views
Tcl: How to concatenate two binary value?
Want to concatenate two binary values to get a 16 bits value and save to a file.
First binary is 6 bits constant 000111, second binary starts from 0 and increment by 1 for each loop.
#!/usr/bin/tclsh
...
0
votes
1
answer
716
views
How to install cmdline on Oracle Linux server
I am running into error "package require cmdline" while making a build and need this package, how can I install this package?
I Looked at How to install a Tcl package? which doesnt exactly tell how ...
0
votes
1
answer
604
views
Intel's IPMI tool fails in WinPE 10 64-bit
The IPMI app I have, Intel's IPMI, V2.0, Command Test Tool from https://www.intel.com/content/www/us/en/servers/ipmi/ipmi-technical-resources.html is rejected by WinPE 10 which states "This version ...
0
votes
0
answers
260
views
is there a dll for tls that can run on winows?
I have an exe that will look for a file on the server, and download the latest exe. All this is implemented in tcl on a linux machine. Since this communication is secure, I have used http and tls ...
1
vote
1
answer
627
views
Encryption compatibility between TCL and openssl
I have a shell script and a tcl script using encryption mechanism and want to have a same cipher output from both the scripts.
for example, the output cipher of tcl script and shell script should be ...
0
votes
0
answers
84
views
tclsh script within a sh script permissions
I am having an issue with calling a tclsh script from within a sh script on Ubuntu.
I can call the tclsh script form the terminal successfully, yet as soon as I try and automate its calling from ...
9
votes
2
answers
24k
views
How to install a Tcl package?
I am trying to run a Tcl script that has package require cmdline, and it complains:
can't find package cmdline
How do I find and install another Tcl package into an existing Tcl installation?