Script required

Jonathan Billings jsbillin at umich.edu
Thu Nov 4 22:53:25 UTC 2010


On Nov 4, 2010, at 5:52 PM, nani wrote:
> Is there any way to provide password from the bash script, please let me
> know the script
> 
> there is some package in which it will ask for username and password, we
> wanted to have this installation by script
> 
> ./vasInstall.ksh <<EOF
> yes
> ad1
> 
> ibmi1530
> PASSWORD
> EOF
> this password it is not taking through script
> 
> can you people suggest some other way to that

You probably could use 'expect' (which uses Tcl) to automate interacting with the script.  This isn't a bash script, but you'll be able to interact with the ksh script as if it were an interactive process.  If you don't like tcl, there are Python and Perl expect modules as well.

--
Jonathan Billings <jsbillin at umich.edu>
College of Engineering - CAEN - Unix and Linux Support








More information about the redhat-list mailing list