tclsh

Strawberry Perl v5.30.0 not able to install Tcl (Windows 10)

大城市里の小女人 提交于 2020-01-24 20:26:05
问题 I downloaded and installed strawberry-perl-5.30.0.1-64bit.msi from strawberryperl.com on my Windows 10 and tried to install Tcl module using cpan, but it fails for missing tclsh. What could be the problem? C:\Strawberry>cpan Tcl Loading internal logger. Log::Log4perl recommended for better logging CPAN: CPAN::SQLite loaded ok (v0.217) Database was generated on Thu, 24 Oct 2019 12:40:15 GMT Running install for module 'Tcl' CPAN: Digest::SHA loaded ok (v6.02) CPAN: Compress::Zlib loaded ok (v2

Tcl Output redirection from stdout to a file

夙愿已清 提交于 2019-12-23 04:20:12
问题 I know this question has been asked several times here. I have looked at the responses, but couldn't figure out the way it worked.Can you please help me understand. Here it goes: I'm trying to source a tcl script on the tclsh command line, and I want to redirect the output of that script into a file. $ source my_script.tcl The script my_script.tcl is something like this: set output_file final_result set OUT [open $output_file w] proc calculate{} { <commands> return $result } foreach value

simulate diff output using tcl exec diff on two strings

让人想犯罪 __ 提交于 2019-12-08 02:46:12
问题 I am trying to produce same output of diff command in tclsh using tcl exec diff on two strings. Could you please let me know how to solve this example using tclsh exec diff Working with Bash $ diff <(echo "Testword") <(echo "Testword2") 1c1 < Testword --- > Testword2 Failed on TCL set str1 "Testword" set str2 "Testword2" First attempt % exec diff <(echo "$string1") <(echo "$string2") extra characters after close-quote Second attempt % exec diff <(echo \"$string1\") <(echo \"$string2\") couldn

Set the terminal tab title as prompt name in unix

痴心易碎 提交于 2019-12-02 01:41:00
问题 Lets say, the prompt is as below run_scripts > How to set that terminal tab title same as prompt i.e Terminal tab tile also should be run_scripts> So that terminal title should dynamically update when the prompt changes. 回答1: Many terminals emulators are able to understand the special escaping : "\033]0;foo\007" . 回答2: I know its a old post but i saw it today : Here is the answer: title `pwd` if title command does not works in your shell then: write a shell script with follwing contents