If you don't want to use an external 'grep' binary a rudimentary workalike is only a few lines in tcl which can be easily utilized by your expect script.
I am using ActiveState 8.4.16.0, I have found this code format that seems to work great:
expect "Login:*"
send "root\r"
expect ">*"
send "ksh\r"
expect "#*"
send "tar -xvf /dev/rmt/0m\r"
expect "#"
My question is, how do I set it up to fail out if one of the expect calls
doesn't... (0 Replies)
Hello to all...this is my first post (so please go easy). :)
I feel pretty solid at expect scripting, but I'm running into an issue that I'm not able to wrap my head around. I wrote a script that is a little advanced for logging into a remote Linux machine and changing text in a file using sed.... (2 Replies)
This Expect script provides expect with a list of IP addresses to Cisco IPS sensors and commands to configure Cisco IPS sensors. The user, password, IP addresses, prompt regex, etc. have been anonymized. In general this script will log into the sensors and send commands successfully but there are... (1 Reply)
Hello All,
I am trying to automate an installation process using expect and sh script. My problem is that during the installation process the expected value can change according to the situation.
For Example if this is a first time installation then at step 3 I'll get "Do you want to accept... (0 Replies)
Hi,
Am very new to expect scripting..
Can You please suggest me how to call an expect script inside another expect script..
I tried with
spawn /usr/bin/ksh
send "expect main.exp\r"
expect $root_prompt
and
spawn /usr/bin/ksh
send "main.exp\r"
expect $root_prompt
Both... (1 Reply)
I'm fairly new to scripting so this might not be possible.
I am using Expect with Cisco switches and need to capture the string after finding the expect request. For example, when I issue "show version" on a Nexus switch, I'm looking to capture the current firmware version:
#show version
... (0 Replies)
Discussion started by: IBGaryA
0 Replies
LEARN ABOUT OPENSOLARIS
tk_gethwnd
HWND(3TK) Tk Library Procedures HWND(3TK)__________________________________________________________________________________________________________________________________________________NAME
Tk_GetHWND, Tk_AttachHWND - manage interactione between the Windows handle and an X window
SYNOPSIS
#include <tkPlatDecls.h>
HWND
Tk_GetHWND(window)
Window
Tk_AttachHWND(tkwin, hwnd)
ARGUMENTS
Window window (in) X token for window.
Tk_Window tkwin (in) Tk window for window.
HWND hwnd (in) Windows HWND for window.
_________________________________________________________________DESCRIPTION
Tk_GetHWND returns the Windows HWND identifier for X Windows window given by window.
Tk_AttachHWND binds the Windows HWND identifier to the specified Tk_Window given by tkwin. It returns an X Windows window that encapsulates
the HWND.
KEYWORDS
identifier, window
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+--------------------+-----------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+--------------------+-----------------+
|Availability | SUNWTk |
+--------------------+-----------------+
|Interface Stability | Uncommitted |
+--------------------+-----------------+
NOTES
Source for Tk is available on http://opensolaris.org.
Tk 8.0 HWND(3TK)