Sponsored Content
Full Discussion: Send ctrl+C in expect script
Operating Systems AIX Send ctrl+C in expect script Post 302693797 by bakunin on Wednesday 29th of August 2012 05:44:05 PM
Old 08-29-2012
You probably shouldn't use expect for this. Use the ksh coprocess facility instead. You can simply terminate the coprocess then by issuing kill -15 %1 or similar from the main process.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
 

10 More Discussions You Might Find Interesting

1. AIX

Disable ctrl-c,ctrl-d,ctrl-d in ksh script

I wrote a ksh script for Helpdesk. I need to know how to disable ctrl-c,ctrl-z,ctrl-d..... so that helpdesk would not be able to get to system prompt :confused: (6 Replies)
Discussion started by: wtofu
6 Replies

2. Shell Programming and Scripting

within shell script send expect and if else

Hi I have written one shell script , using that i am able to connect to remote machine but i have to #!/usr/bin/expect -f set address set username set password set OOLpath set dbusername set dbpasswd set tnsname set recdbusername set recdbpasswd set rectnsname spawn ssh... (1 Reply)
Discussion started by: mnmonu
1 Replies

3. Shell Programming and Scripting

within shell script send expect and if else

Hi, I have written one shell script , using that i am able to connect to remote machine but i have to #!/usr/bin/expect -f set address set username set password set OOLpath set dbusername set dbpasswd set tnsname set recdbusername set recdbpasswd set rectnsname spawn ssh... (2 Replies)
Discussion started by: mnmonu
2 Replies

4. Shell Programming and Scripting

How to send Ctrl Break combination in Expect

Greetings, I am writing an Expect script to automate multiple processes on an HP-UX system. Everything has gone fine so far but I now have run into a problem. One of the processes that I'm trying to automate requires the key combination of ctrl break and I have so far been unable to figure out... (1 Reply)
Discussion started by: g_trueblood2000
1 Replies

5. Shell Programming and Scripting

Bash Script: Send files to SFTP using Expect

I have to send few gzipped files from local server to SFTP server. My Server Info Distributor ID: Ubuntu Description: Ubuntu 12.04.4 LTS Release: 12.04 Codename: precise Created a bash script and could able to send files to sftp, but i want to send email if transfer is successful. ... (1 Reply)
Discussion started by: krux_rap
1 Replies

6. Shell Programming and Scripting

Send ctrl-C signal using bash script.

declare -a array=( "LLC-load-misses" "LLC-loads" "LLC-store-misses" "LLC-stores" "branch-load-misses" "branch-loads" "dTLB-load-misses" "dTLB-loads" "dTLB-store-misses" "dTLB-stores" "iTLB-load-misses" "iTLB-loads" "branch-instructions" "branch-misses" "bus-cycles" "cache-misses" "cache-references"... (2 Replies)
Discussion started by: BHASKAR JUPUDI
2 Replies

7. Shell Programming and Scripting

Expect script error : send: spawn id exp4 not open

Hi, I am executing a expect script in while loop for doing telnet on list of servers stored in file as below : expect script : #!/usr/bin/expect -f set timeout 20 set ip set port if { == 0} { send_user "Usage: scriptname ip port\n" exit 1 } #exp_internal 1 log_user 0 spawn... (3 Replies)
Discussion started by: omkar.jadhav
3 Replies

8. Shell Programming and Scripting

Multiple expect/send statements not working in shell script

Hi I am trying the following in my bash script which logs into my machine and runs a command. Trying to solve this using expect. The first expect statement is hit and it enters the address "10.10.0.10" but when the second expect statement is hit it exits #!/bin/bash expect -c ' spawn... (2 Replies)
Discussion started by: skorada
2 Replies

9. Shell Programming and Scripting

Expect command to send the user input enter or ctrl+c

Hey All, I am writing one script using expect, that script which is used in spawn will accepts only 1. Enter 2. Ctrl+c Press Control-C to exit, Enter to proceed. Could some one share some thoughts to send the above user inputs in linux expect block ? Thanks, Sam (0 Replies)
Discussion started by: SCHITIMA
0 Replies

10. UNIX for Beginners Questions & Answers

To send ID and Password for each command using expect feature in bash script

Dear Tech Guys, I am trying to send some commands on the local server and it always asks for user name and password after each command. To serve the purpose I am using expect function as follows: #!/usr/bin/expect set timeout 20 spawn "./data1.sh" expect "Please Enter UserName: "... (6 Replies)
Discussion started by: Xtreme
6 Replies
Handle Management(3)						 globus ftp client					      Handle Management(3)

NAME
Handle Management - Typedefs typedef struct globus_i_ftp_client_handle_t * globus_ftp_client_handle_t" Initialize globus_result_t globus_ftp_client_handle_init (globus_ftp_client_handle_t *handle, globus_ftp_client_handleattr_t *attr) Destroy globus_result_t globus_ftp_client_handle_destroy (globus_ftp_client_handle_t *handle) URL Caching globus_result_t globus_ftp_client_handle_cache_url_state (globus_ftp_client_handle_t *handle, const char *url) globus_result_t globus_ftp_client_handle_flush_url_state (globus_ftp_client_handle_t *handle, const char *url) User Pointer globus_result_t globus_ftp_client_handle_set_user_pointer (globus_ftp_client_handle_t *handle, void *user_pointer) globus_result_t globus_ftp_client_handle_get_user_pointer (const globus_ftp_client_handle_t *handle, void **user_pointer) Plugins globus_result_t globus_ftp_client_handle_add_plugin (globus_ftp_client_handle_t *handle, globus_ftp_client_plugin_t *plugin) globus_result_t globus_ftp_client_handle_remove_plugin (globus_ftp_client_handle_t *handle, globus_ftp_client_plugin_t *plugin) Detailed Description Create/Destroy/Modify an FTP Client Handle. Within the Globus FTP Client Library, all FTP operations require a handle parameter. Currently, only one FTP operation may be in progress at once per FTP handle. FTP connections may be cached between FTP operations, for improved performance. This section defines operations to create and destroy FTP Client handles, as well as to modify handles' connection caches. Typedef Documentation typedef struct globus_i_ftp_client_handle_t* globus_ftp_client_handle_t FTP Client Handle. An FTP client handle is used to associate state with a group of operations. Handles can have attributes associated with them. All FTP operations take a handle pointer as a parameter. See also: globus_ftp_client_handle_init(), globus_ftp_client_handle_destroy(), globus_ftp_client_handleattr_t Function Documentation globus_result_t globus_ftp_client_handle_init (globus_ftp_client_handle_t *handle, globus_ftp_client_handleattr_t *attr) Initialize a client FTP handle. Initialize an FTP handle which can be used in subsequent get, put, or transfer requests. A handle may have at most one get, put, or third-party transfer in progress. Parameters: handle The handle to be initialized. attr Initial attributes to be used to create this handle. See also: globus_ftp_client_handle_destroy() globus_result_t globus_ftp_client_handle_destroy (globus_ftp_client_handle_t *handle) Destroy a client FTP handle. A FTP client handle may not be destroyed if a get, put, or third-party transfer is in progress. Parameters: handle The handle to be destroyed. See also: globus_ftp_client_handle_init() globus_result_t globus_ftp_client_handle_cache_url_state (globus_ftp_client_handle_t *handle, const char *url) Cache connections to an FTP server. Explicitly cache connections to URL server in an FTP handle. When an URL is cached, the client library will not close the connection to the URL server after a file transfer completes. Parameters: handle Handle which will contain a cached connection to the URL server. url The URL of the FTP or GSIFTP server to cache. See also: globus_ftp_client_flush_url_state() globus_result_t globus_ftp_client_handle_flush_url_state (globus_ftp_client_handle_t *handle, const char *url) Remove a cached connection from the FTP client handle. Explicitly remove a cached connection to an FTP server from the FTP handle. If an idle connection to an FTP server exists, it will be closed. Parameters: handle Handle which will contain a cached connection to the URL server. url The URL of the FTP or GSIFTP server to cache. globus_result_t globus_ftp_client_handle_set_user_pointer (globus_ftp_client_handle_t *handle, void *user_pointer) Set/Get the user pointer field from an ftp client handle. The user pointer is provided to all the user of the FTP client library to assocate a pointer to any application-specific data to an FTP client handle. This pointer is never internally used by the client library. Parameters: handle The FTP client handle to set or query. user_pointer The value of the user pointer field. Note: Access to the user_pointer are not synchronized, the user must take care to make sure that multiple threads are not modifying it's value. globus_result_t globus_ftp_client_handle_add_plugin (globus_ftp_client_handle_t *handle, globus_ftp_client_plugin_t *plugin) Add a plugin to an FTP client handle. This function adds a plugin to an FTP client handle after it has been created. Plugins may be added to an ftp client handle whenever an operation is not in progress. The plugin will be appended to the list of plugins present in the handle, and will be invoked during any subsequent operations processed with this handle. Only one instance of a particular plugin may be added to a particular handle. Plugins may be removed from a handle by calling globus_ftp_client_remove_plugin(). Parameters: handle The FTP client handle to set or query. plugin A pointer to the plugin structure to add to this handle. See also: globus_ftp_client_remove_plugin(), globus_ftp_clent_handleattr_add_plugin(), globus_ftp_clent_handleattr_remove_plugin() globus_result_t globus_ftp_client_handle_remove_plugin (globus_ftp_client_handle_t *handle, globus_ftp_client_plugin_t *plugin) Remove a plugin to an FTP client handle. This function removes a plugin from an FTP client handle after it has been created. Plugins may be removed from an ftp client handle whenever an operation is not in progress. The plugin will be removed from the list of plugins, and will not be used during any subsequent operations processed with this handle. This function can remove plugins which were added at handle initialization time or by calling globus_ftp_client_handle_add_plugin(). Parameters: handle The FTP client handle to set or query. plugin A pointer to the plugin structure to remove from this handle. See also: globus_ftp_client_add_plugin(), globus_ftp_clent_handleattr_add_plugin(), globus_ftp_clent_handleattr_remove_plugin() globus_result_t globus_ftp_client_handle_get_user_pointer (const globus_ftp_client_handle_t *handle, void **user_pointer) Set/Get the user pointer field from an ftp client handle. The user pointer is provided to all the user of the FTP client library to assocate a pointer to any application-specific data to an FTP client handle. This pointer is never internally used by the client library. Parameters: handle The FTP client handle to set or query. user_pointer The value of the user pointer field. Note: Access to the user_pointer are not synchronized, the user must take care to make sure that multiple threads are not modifying it's value. Author Generated automatically by Doxygen for globus ftp client from the source code. Version 7.3 Mon Apr 30 2012 Handle Management(3)
All times are GMT -4. The time now is 07:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy