The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Perl questions - more frustrated1 Shell Programming and Scripting 7 10-08-2007 02:38 PM
perl questions frustrated1 Shell Programming and Scripting 7 10-01-2007 01:52 AM
chess perl program questions hankooknara Shell Programming and Scripting 1 06-30-2007 07:20 PM
Answering posts Gerry405 BSD 3 12-08-2005 03:35 AM
bash and Perl interaction questions deryk Shell Programming and Scripting 2 10-12-2005 01:25 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 02-23-2006
Registered User
 

Join Date: Feb 2006
Posts: 2
Perl: answering automatically to install questions

Hi everybody,

I have been looking for an answer to this issue both on google and on the forum, but I couldn't find anything. please help me

As part of an automated (in perl) install of Solaris 9, I would like to be able to answer automaticaly to the question the installer asks.
Example:


/> /cdrom/cdrom0/s0/Solaris_9/Tools/Installers/liveupgrade20
...
<Press ENTER to continue>
...
<--[21%]--[ENTER To Continue]--[n To Finish]--> n
...

Enter 'y' to accept the license agreement. Enter 'n' to decline the license
agreement and exit the install. Y
...

<Press ENTER to continue>


etc...

Here, I woud like to automatically answer via my perl script that is the following sequence: "enter" then "n" then "y" then "enter"

Is it possible in perl? Can I do it without using threads? Do I have to make a dedicated perl script running in the background that will detect the prompts and answer them? Or maybe a shell script could do it ???

in summary: HELP ME PLEASE

Thanks !!!!

Last edited by zaap; 02-23-2006 at 11:28 AM. Reason: typo
Reply With Quote
Forum Sponsor
  #2  
Old 02-23-2006
Moderator
 

Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,477
So you have tried to use Expect and didn't work out? Or you wouldn't like to use it?

I have no experience with Expect but for questions like these the usual first response I frequently heard from the Perl people was "Expect".
Reply With Quote
  #3  
Old 02-25-2006
Registered User
 

Join Date: Feb 2006
Posts: 2
That's also the answer I had from an other forum: use expect. I'll dig it monday when back to work :-) but it's probably what I'll have to do !

thanks
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:45 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0