10 More Discussions You Might Find Interesting
1. Red Hat
Hi
I need to install expect in redhat.
through net I came to know that I must install tcl too in order to make expect work.
I have downloaded both packages but not able to install
# ls -lrt
total 3720
18:33 tcl8.4.20-src.tar.gz
18:33 expect5.45.3.tar.gz
18:40 expect5.45.3... (7 Replies)
Discussion started by: scriptor
7 Replies
2. Shell Programming and Scripting
hi experts,
how will i convert the first part of my script into expect or tcl since shell script cannot be embedded into expect script ? i have 100+ servers in my serverlist. how will i call or declare it in expect or tcl ?
#!/usr/sbin/expect -f
serverlist=`cat $1`
for i in serverlist... (2 Replies)
Discussion started by: linuxgeek
2 Replies
3. Shell Programming and Scripting
Hello,
I write a TCL script for Expect/ Telnet.
I want to send command to the telnet server.
But I want to close after the command is sent.
Anybody know which command can flush the expect so I can sure the command is sent to the telnet server???
EX:
send "./command1\r"
close... (0 Replies)
Discussion started by: linboco
0 Replies
4. UNIX for Dummies Questions & Answers
hi, I am new in Expect.
I have a question about expect timeout.
suppose I have a structure of
expect { ".."{
send"............"}
timeout{
...............
}
}
The silly question is if I reach timeout, how can I store the error message showing on the screen to... (2 Replies)
Discussion started by: allenxiao7
2 Replies
5. Shell Programming and Scripting
I am having an issue with TCL\Expect; I am passing arguments via the commandline that are read in via "lrange $argv". One of those var's is a password with characters that need to be escapaed, after escaping them an hitting enter expect is placing curly braces around my password... why?!
... (4 Replies)
Discussion started by: RiSk
4 Replies
6. Shell Programming and Scripting
I'm having this problem with a very simple tcl expect script that is running on Solaris 5.3 with TCL version 8.4.7 and expect version 5.0.
below is the simplified version of the code snippet, which I think has everything to illustrate the problem, the full version is at the very bottom in... (0 Replies)
Discussion started by: pinchharmonic
0 Replies
7. Shell Programming and Scripting
In the following "for" loop I assume the the script will expect "anyway", "first" NOT in any paticular order and send "yes" when there found, breaking out of the loop when "$prompt" is found. The way it is working is like 3 individual expect lines, and they MUST be in cronological order. ANY help... (0 Replies)
Discussion started by: dave_m
0 Replies
8. UNIX for Dummies Questions & Answers
Does anyone know of an expect/tcl forum that is as helpful as this one is for shell scripting?
Or if anyone has any expect knowledge, can you please provide some guidance on how to write to a local error log based on output from a ssh session?
I have something like this:
foreach host... (2 Replies)
Discussion started by: earnstaf
2 Replies
9. Shell Programming and Scripting
hai all,
i have an tcl script in which i have been reading the DUT Command prompt of an cisco switch as
DUT Command Prompt : cisco*
and running the test case of stp now the problem is if i have given any blank space in between the cisco or at the startup then the Expect is not identifying the... (0 Replies)
Discussion started by: sanjustudy
0 Replies
10. Shell Programming and Scripting
I am rewriting the first big script project I ever coded to clean up some issues, mainly my really clumsy bash code, and to migrate to TCL/Expect. I have a couple of questions that I could use some help with.
1.) The script needs to know where it is located. I realize that I could use "find /... (1 Reply)
Discussion started by: thumper
1 Replies
Tcl_StaticPackage(3) Tcl Library Procedures Tcl_StaticPackage(3)
__________________________________________________________________________________________________________________________________________________
NAME
Tcl_StaticPackage - make a statically linked package available via the 'load' command
SYNOPSIS
#include <tcl.h>
Tcl_StaticPackage(interp, pkgName, initProc, safeInitProc)
ARGUMENTS
Tcl_Interp *interp (in) If not NULL, points to an interpreter into which the package has already been loaded (i.e.,
the caller has already invoked the appropriate initialization procedure). NULL means the
package has not yet been incorporated into any interpreter.
const char *pkgName (in) Name of the package; should be properly capitalized (first letter upper-case, all others
lower-case).
Tcl_PackageInitProc *initProc (in) Procedure to invoke to incorporate this package into a trusted interpreter.
Tcl_PackageInitProc *safeInitProc (in) Procedure to call to incorporate this package into a safe interpreter (one that will exe-
cute untrusted scripts). NULL means the package cannot be used in safe interpreters.
_________________________________________________________________
DESCRIPTION
This procedure may be invoked to announce that a package has been linked statically with a Tcl application and, optionally, that it has
already been loaded into an interpreter. Once Tcl_StaticPackage has been invoked for a package, it may be loaded into interpreters using
the load command. Tcl_StaticPackage is normally invoked only by the Tcl_AppInit procedure for the application, not by packages for them-
selves (Tcl_StaticPackage should only be invoked for statically loaded packages, and code in the package itself should not need to know
whether the package is dynamically or statically loaded).
When the load command is used later to load the package into an interpreter, one of initProc and safeInitProc will be invoked, depending on
whether the target interpreter is safe or not. initProc and safeInitProc must both match the following prototype:
typedef int Tcl_PackageInitProc(Tcl_Interp *interp);
The interp argument identifies the interpreter in which the package is to be loaded. The initialization procedure must return TCL_OK or
TCL_ERROR to indicate whether or not it completed successfully; in the event of an error it should set the interpreter's result to point to
an error message. The result or error from the initialization procedure will be returned as the result of the load command that caused the
initialization procedure to be invoked.
KEYWORDS
initialization procedure, package, static linking
Tcl 7.5 Tcl_StaticPackage(3)