How to run the script with out any interruption ?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to run the script with out any interruption ?
# 8  
Old 01-13-2012
Here is the simple code I wrote in 3 minutes to generate key automatically:
Code:
#!/usr/bin/expect

spawn /usr/bin/ssh-keygen

expect "Enter file in which to save the key" {send "\n"}
expect "Enter passphrase" {send "\n"}
expect "Enter same passphrase again" {send "\n"}

Then the output here (I type nothing)
Code:
>> ./genkey.sh
spawn /usr/bin/ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/xxx/xxxxxxx/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again: 
>>

Try your self. Smilie
# 9  
Old 01-13-2012
Hi,

use 3 echo like echo |echo|echo /*** The command *****/

thanks,
venkat
# 10  
Old 01-13-2012
Its not workin for second and third "enters"
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script run in a case statement call to run a php file, also Perl

Linux System having all Perl, Python, PHP (and Ruby) installed From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file eg eg a Shell script run in a case statement call to run a php file, also Perl or/and Python file??? Like #!/usr/bin/bash .... .... case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies

2. Programming

Simple capturing of keyboard input without interruption

I would like to make a function or command that checks for keyboard input without interrupting the program and exits the program when a key is pressed (perhaps the 'q' key). The program below monitors and prints/executes commands upon a change in primary (mouse selection) or clipboard buffer. If... (4 Replies)
Discussion started by: bedtime
4 Replies

3. Shell Programming and Scripting

Script fails to run properly when run from CRONTAB

Hello all, I'm trying to write a script to gather and send data and it works just fine at the bash command line, but when executing from CRON, it does not run properly. My scripting skills are pretty limited and there's probably a better way, but as I said it works at the command line, but... (12 Replies)
Discussion started by: rusman
12 Replies

4. AIX

ssh interruption after aix os upgrade

Hi Through nimadm (alt_disk_install) we done aix os upgrade in 3 lpars from aix 5.3 to aix 6.1. upgrade was successful. After the upgrade users complained on their ssh keys. Does upgrading aix version affects the user's ssh keys ? If so please suggest on options to correct them. (1 Reply)
Discussion started by: newtoaixos
1 Replies

5. Shell Programming and Scripting

how to run an already made script run against a list of ip addresses solaris 8 question

how to run an already developed script run against a list of ip addresses solaris 8 question. the script goes away and check traffic information, for example check_GE-VLANStats-P3 1.1.1.1 and returns the results ok. how do I run this against an ip list? i.e a list of 30 ip addresses (26 Replies)
Discussion started by: llcooljatt
26 Replies

6. Shell Programming and Scripting

ssh connection through shell script with no interruption

Hi all, I need ssh in shell script. My requirement is: - Take user_name and password from user (in PHP) - Pass this to shell script which will: - connect via ssh - Run sql query - Pass the results back in PHP - Put the results to website. I know PHP has libraries for ssh and ftp, but... (3 Replies)
Discussion started by: shekhar2010us
3 Replies

7. UNIX and Linux Applications

Apache+Perl: interruption of STDIN

Hello dear community! I have faced with a trouble which I trying to solve for a long time. I have service of video streaming. And I have web and video roles for servers. Video servers upload video using SWFUpload and then stream it. Issue became during uploading of video. In random time... (3 Replies)
Discussion started by: sevmax
3 Replies

8. Red Hat

util-linux upgrade with interruption?

Hi All, I have util-linux upgrade that I need to do on redhat 4 ent. Does this going to interruption with the operation of the OS or application? Or this will be straight forward upgrade that will not make a harm or downtime of the OS. Thank you for any comments you may add. (3 Replies)
Discussion started by: itik
3 Replies

9. Programming

Wireless C program conncection interruption problem

Dear Gurus My company has a wireless handheld C program as text-mode workstations in remote sites. We suspected that the program get interrupted sometimes because of out-of-wireless access and hence resulted in db record locking and other issue. It did trouble us a lot. Is it possible to use... (2 Replies)
Discussion started by: charles_chu
2 Replies
Login or Register to Ask a Question