Sponsored Content
Full Discussion: Expect/Tcl help?
Top Forums UNIX for Dummies Questions & Answers Expect/Tcl help? Post 302128773 by earnstaf on Thursday 26th of July 2007 10:01:14 AM
Old 07-26-2007
Quote:
Originally Posted by sysgate
See if this will satisfy your needs.
Actually, I haven't done this so far, but looks interesting to me, so here's what I found :
Code:
log_file -a "/tmp/expect-ssh"
send_log "this is for the log test"

I guess this is what your looking for. HTH.
Hey sysgate... I had found this log_file a little after posting this. I think it's definitely the right track. I'll play with it some today. I'd like to find a way to put the actually error message to log (as opposed to my echo'ed line.) I think in Expect I need to have the file open as well.

Thanks for the reply... I'll get it eventually Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

TCL/Expect project questions

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

2. Shell Programming and Scripting

Expect with tcl/tk

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

3. Shell Programming and Scripting

Tcl expect HELP

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

4. Shell Programming and Scripting

tcl/expect

Can someone identify what is the problem here?. no children while executing "exp_wait -nowait -i -1" (procedure "logOptions" line 45) invoked from within "logOptions" (procedure "doExecute" line 98) invoked from within "doExecute" (procedure "main" line 32) ... (7 Replies)
Discussion started by: calsum
7 Replies

5. Shell Programming and Scripting

Help with TCL/Expect in Solaris 5.3

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

6. Shell Programming and Scripting

TCL/Expect not working as expected

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

7. UNIX for Dummies Questions & Answers

Expect/Tcl help

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

8. Shell Programming and Scripting

expect TCL script

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

9. Shell Programming and Scripting

Convert my shell script into expect/tcl

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

10. Red Hat

Issue in installing expect and Tcl

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
sprayd(1M)																sprayd(1M)

NAME
rpc.sprayd, sprayd - spray server SYNOPSIS
log_file] DESCRIPTION
is an RPC server that records the packets sent by from another system (see spray(1M)). daemon may be started by or through the command line. The service provided by is not useful as a networking benchmark as it uses unreli- able connectionless transports, UDP, for example. It can report a large number of packets dropped when the drops were caused by the pro- gram sending packets faster than they can be buffered locally, that is, before the packets get to the network medium. Options recognizes the following options and command-line arguments: Log any errors to the named log file, log_file. Errors are not logged if the option is not specified. Information logged to the file includes date and time of the error, host name, process id and name of the function gen- erating the error, and the error message. Note that different services can share a single log file since enough infor- mation is included to uniquely identify each error. Exit after serving each RPC request. Using the option, the security file can control access to RPC services. Exit only if o dies (see rpcbind(1M)), o Another registers with or o becomes unregistered with The option is more efficient because a new process is not launched for each RPC request. is the default. AUTHOR
was developed by Sun Microsystems, Inc. SEE ALSO
inetd(1M), rpcbind(1M), spray(1M), inetd.conf(4), inetd.sec(4), services(4). sprayd(1M)
All times are GMT -4. The time now is 03:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy