09-16-2005
Quote:
Originally Posted by paulmac
If you want the expect script to pause / wait for a certain amount of time
then just add
sleep 1
at the appropriate position
This will cause the prg to wait for 1 second.
You could also force expect into conservative mode, read the man page
on your system for information on this.
This will make the prg wait 1/10 sec between each character being sent.
Well, it doesn't seem to need a pause as far as I can tell. It seems more like it's looking for the Continue yes/no text, but if the key is already on that system, it never shows up and doesn't continue to input the password.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have to write an automated sftp script which uses password authentication method to access the remote server. I want to pass the password as a parameter or to be included in the script itself, so that when i run the sftp script, it should not prompt me to enter the password.
Thanks in advance... (1 Reply)
Discussion started by: Rajeshsu
1 Replies
2. Shell Programming and Scripting
Hi all, i got a really strange problem
i wrote a script, when i run this script manually everything works fine
but when i make a cronjob for it, with the same user, the EXPECT script will not work.
Only the first line will be executed
this is the SHell bash script
#!/bin/sh;
php -q... (2 Replies)
Discussion started by: digitac
2 Replies
3. Shell Programming and Scripting
Hi All,
Here is my Expect script, I don't get any error message when I run it. But the file never goes to other system? I also paste the output screen below.
When I run the script, the script runs so fast. But when I do it manually, it takes about 10 minutes for the file to transfer.
... (1 Reply)
Discussion started by: samnyc
1 Replies
4. Solaris
Hi
We are trying to set up a non-interactive sftp to one of our clients to be able to transfer files to them. For the setup I logged into server1 as user1 and generated RSA public and private keys id_rsa and id_rsa.pub. Then I did an sftp to server2 as user2 and put the id_rsa.pub in the .ssh... (4 Replies)
Discussion started by: vnparo
4 Replies
5. Shell Programming and Scripting
Hi Guys,
I am working on a shell script, which gets log files from a windows machine.
Problem:
1. My server doesn't support FTP, so i am using SFTP
2. I am not able to automate sftp using public key generation technique, because i need to access many windows machines using this script. ... (0 Replies)
Discussion started by: rajhydprag
0 Replies
6. UNIX for Dummies Questions & Answers
Hi Newbie here
I am having problems with automating sFTP transfers.
Just to save time - SCP is not an option as sFTP is stipulated by controllers of far end server.
Ineed to automate sFTP transfer of a single file, once a day to a remote server to which i have no control over.
I am using:... (6 Replies)
Discussion started by: robbien
6 Replies
7. Shell Programming and Scripting
I am trying to use a for loop in my expect cmdFile that I am calling.
I want to be able to call either one file name or a series of file names in the working directory (that I won't know the names before hand) and then pass the names to the sftp program.
Something like for i in (ls *txt)
do (0 Replies)
Discussion started by: vedder191
0 Replies
8. Shell Programming and Scripting
Hi All,
I am currently looking at automating the steps that I follow to download log files from putty to desktop.
I connect to a client's machine through citrix desktop. I am required to download quite a number of application logs to identfiy the issues in production.
Steps that is being... (3 Replies)
Discussion started by: krackjack84
3 Replies
9. Shell Programming and Scripting
hi
i want to automate fdisk command .
i spawned a process containing fdisk command from a process
and tried to send the options to fdisk promt from that process.
but that spawed process is notstarting itself
help me out
trying for two days
:wall:
my code:
#!/bin/bash
echo... (5 Replies)
Discussion started by: jagak89
5 Replies
10. Shell Programming and Scripting
Hi,
I am trying to sftp using expect, but not getting through as it prompt for password is coming
Following is the code
#/usr/bin/expect > output.log
sftp medcdr@10.130.254.50
expect "password:"
send "Med@Cdr12\n"
expect "sftp>"
send "put ZTE_*201505*\r"
expect "sftp>"
send "bye\r"... (7 Replies)
Discussion started by: siramitsharma
7 Replies
pause(3) Library Functions Manual pause(3)
NAME
pause - Suspends a process until it receives a signal
LIBRARY
Standard C Library (libc.so, libc.a)
SYNOPSIS
#include <unistd.h>
int pause( void );
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
pause(): POSIX.1, XPG4, XPG4-UNIX
Refer to the standards(5) reference page for more information about industry standards and associated tags.
DESCRIPTION
The pause() function suspends the calling process until it receives a signal whose action is either to execute a signal-catching function
or terminate the process. The signal must be one that is acknowledged by the calling process. The pause() function does not affect the
action taken when a signal is received.
The pause() function suspends the calling process by suspending the calling thread. Other threads in the process, if any, are not sus-
pended.
RETURN VALUES
When the received signal causes the calling process to terminate, the pause() function does not return.
When the signal is caught by the calling process and control is returned from the signal-catching function, the calling thread resumes exe-
cution from the point of suspension. At that point, the pause() function returns a value of -1 and sets errno to indicate the error.
ERRORS
The pause() function sets errno to the specified values for the following conditions: The signal has been caught by the calling process and
control has been returned from the signal-catching function.
RELATED INFORMATION
Functions: kill(2), sigaction(2), sigvec(2), wait(2)
Routines: alarm(3)
Standards: standards(5) delim off
pause(3)