LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to accept term of agreement in shellscript (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-accept-term-of-agreement-in-shellscript-782791/)

Musapha 01-17-2010 12:43 PM

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

GrapefruiTgirl 01-17-2010 12:53 PM

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.

Musapha 01-17-2010 04:23 PM

im affraid
 
Quote:

Originally Posted by GrapefruiTgirl (Post 3829899)
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.


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

GrapefruiTgirl 01-17-2010 04:35 PM

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.

Musapha 01-17-2010 04:39 PM

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

GrapefruiTgirl 01-18-2010 05:41 AM

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

chrism01 01-18-2010 05:40 PM

Have you tried the 'expect' tool?

GrapefruiTgirl 01-18-2010 06:03 PM

@ 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.