Questions tagged [tcl]

Tcl is a scripting programming language being popular for rapid prototyping and testing.

It was originally introduced by John Ousterhout and the abbreviation standed for Tool Command Language.

14 questions
9
votes
2 answers

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?
2
votes
1 answer

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 like: proc source_file {file} { uplevel…
Chris
  • 37
1
vote
1 answer

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, nothing is actually running, but I get no…
Chris
  • 37
1
vote
1 answer

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 Windows 7 (and XP as well, a couple of years ago), I…
1
vote
1 answer

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 understand that it is basically a superset of TCL,…
1
vote
1 answer

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 the same.The encryption mechanism that I wish to…
0
votes
1 answer

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 would like to fix my problem by installing a newer…
0
votes
1 answer

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?
0
votes
1 answer

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 {value} { global x refID set value [expr…
Sam Dean
  • 103
0
votes
2 answers

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 set output_file "output.dat" set data_number "10"…
Fisher
  • 757
0
votes
1 answer

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 to do that
0
votes
1 answer

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 is not compatible with the version you're…
K7AAY
  • 9,725
0
votes
0 answers

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 libraries of tcl. Now I have to run the same exe on…
0
votes
0 answers

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 within the sh script it fails. I believe it to be a…
Tom
  • 23