The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 10-03-2008
muhilan.r muhilan.r is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 2
Shell Script to Automate Package Installation

Hi,
I have been asked to automate the package installation through shell script.
I have 10 packages to be installed and in that 4 packages requires additional DB information(Host Name, Credentials etc) to be passed and for remaining 6 packages i need to provide the "Yes" - "No" .
I have tried with expect , admin file but as per my understanding both requires standard input/steps to defined. Can i use expect with If loop after spawning the command
say f or ex : Spawn pkgadd "Test.pkg"
if (expect [Host Name])
then
send "HOST NAME"
Is it possible to validate the outcome of the command and input the option through shell script? Please Clarify. or Do we have any other approach to perform this?

Thanks,
Muhil