how to accept term of agreement in shellscript
hello all ,
i have to agree the term of agreement before runing it becase i want to automate my installation with a script i have already tried "yes | ./myfile " but the problem is the agreement is more than one page and i need to hit space couple of times .. so it's not working . please help me thanx in advance |
Usually, when "myfile" is a configuration file ( a shell script often ) there is an available option, such as --accept-license or something like that, for accepting the license when automating the process.
Is it a configure script? If so, try running: shell# ./configure --help and look for an option to accept the license. |
im affraid
Quote:
first of all thanx for the reply beside im affraid none of --accept-license or --help works seems like the ./myfile.BIN do not have any switch is there any other way you could suggest ? thanx |
So, this thing you're trying to run, it's a binary installer?
Maybe if you give us more details, we could help better. What exactly is it you're trying to execute, and what does it do? Is it an installer? A self-extracting archive of some sort? And, since you're posting from Windows by the looks of things, please tell us what Linux you're working with. |
in this case my file is jre-1_6_0_02-linux-i586.bin " java "
i would be realy thankful if you guys show me the way becease actully all my other script lines are depends on this one thanx alot for considering my request |
Hi Musapha.
I have tried several methods of getting the java installer to skip forward to accepting the license, but with no success. You are correct as far as I can tell, it does not accept any arguments, but simply must be run "as is". While there may be a workaround, I cannot find it. Perhaps another member will have a solution for you, but unfortunately, I do not. Cheers :) Sasha |
Have you tried the 'expect' tool?
|
@ chrism01 -- excellent (I've said it before, and I'll say it now: I learn something EVERY day around here) :)
I'd never used expect for anything until I read your reply, which inspired me to try it out. The man page is confusing, but yes, expect does the job! Here's a hint for the OP: see if you have /usr/bin/autoexpect on your system, and if so, try it out. Thanks Chrism Sasha |
All times are GMT -5. The time now is 11:12 AM. |