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
run a command automatically after every 10 mins vikas027 Shell Programming and Scripting 4 11-01-2007 01:01 PM
Stupid question but please answer Corrail Shell Programming and Scripting 6 11-15-2005 09:55 PM
When is SIGCHLD is raised. supersumanth High Level Programming 4 10-21-2005 09:45 AM
Automatically executing a command robbiegregg UNIX for Dummies Questions & Answers 8 04-06-2005 08:46 AM
A question that need an answer Plz Erythro73 UNIX for Dummies Questions & Answers 6 10-31-2002 05:24 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-10-2008
Registered User
 

Join Date: Jul 2006
Posts: 141
automatically answer a question raised by a command

i have installed vmware on a text base linux node

now i have to vmware-configure.pl to do the initial configuration

now 1st step it askes for agreeing for a " License Agreement"

for that i have to say "q" and "yes" to Accept it

i want to run a script with does these 3 steps without user intervention

1) vmware-configure.pl
2) type "q" to exit the License Agreement
3) type "yes" to Accept it and
4) Ctrl C to come out of it

can we do these with out any user intervention ??
Reply With Quote
Forum Sponsor
  #2  
Old 05-10-2008
Moderator
 

Join Date: Dec 2003
Location: /dev/fl
Posts: 1,059
Why not just modify the perl script?
Reply With Quote
  #3  
Old 05-10-2008
Registered User
 

Join Date: Dec 2007
Posts: 260
expect can do this
Reply With Quote
  #4  
Old 05-10-2008
Registered User
 

Join Date: Jul 2006
Posts: 141
sudo vmware-config.pl << EOF
yes
no
yes
EOF


this is doing the work for me but

how to give a ENTER in that series's as but one blank line doesnt see to work

more clearly --
it show

You must read and accept the End User License Agreement to continue.
Press enter to display it.
--More--(Next file: /usr/share/doc/vmware/EULA)

and when i give a "q" it goes off .. but i am not able to pass this via << EOF

any ideas??
Reply With Quote
  #5  
Old 05-11-2008
Registered User
 

Join Date: Dec 2007
Posts: 260
try this prior to running your script.

Code:
export MORE="-e -n 10000"
Reply With Quote
  #6  
Old 05-11-2008
Registered User
 

Join Date: Jul 2006
Posts: 141
Quote:
export MORE="-e -n 10000"
beautiful tweak that worked )

but is there now way to pass it to << ??

to make much simper

open a man page and display 2 pages by "space" and "space" and then give a "q" and come out

say

man sed << EOF
(space)
(space)
q
EOF

but not sure y it doesnt work ??
Reply With Quote
  #7  
Old 05-11-2008
Registered User
 

Join Date: May 2008
Posts: 33
Instead of typing a "space" in your <<here doc, you could try giving it the octal value for that keystroke. That may work.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:20 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