简体   繁体   中英

how to install tcl in linux system

I am using a Tcl script to change the poller password through spawning the telnet command. I have done this with the script below, and tested it on a Windows machine after installing ActiveTcl8.5.13.0.296436-win32-ix86-threaded

spawn telnet $serNumber $pNumber
#flush stdout
expect ">"

send "Clients\r"
expect ">"

send "1\r"
expect ">"

send "Pollers\r"
expect ">"

Now I want to run same script in a Linux machine, but as I am new to Linux systems, can anybody help me that how to install tcl in linux system and get executed the same script there?

Any help is a great for me. Please provide any useful links.

You're in luck. RHEL 4 has expect in its repositories. You can simply install it with yum :

yum install expect

and it should install expect and all its dependencies.

You're not using Tcl, you're using expect , which is a separate program which just happens to use Tcl. To install it, do

apt-get install expect

Note that the above command is a guess as you did not tell us which Linux-based OS you're using ("Linux" is not an OS, it's just a kernel).

If you have no one to ask which system you're running, post the results of running the following commands:

uname -a
lsb_release -a
cat /etc/issue

so we could try to make an educated guess.

To install Tcl on Linux (I'm using RedHat), you can do

yum install tcl

And you will get the most recent version of tcl.

在ubuntu上:

 sudo apt-get install tcl

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM