LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-17-2010, 12:43 PM   #1
Musapha
LQ Newbie
 
Registered: Jan 2010
Distribution: Linux redhat 4 , centos 5.4
Posts: 3

Rep: Reputation: 0
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
 
Old 01-17-2010, 12:53 PM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
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.
 
Old 01-17-2010, 04:23 PM   #3
Musapha
LQ Newbie
 
Registered: Jan 2010
Distribution: Linux redhat 4 , centos 5.4
Posts: 3

Original Poster
Rep: Reputation: 0
im affraid

Quote:
Originally Posted by GrapefruiTgirl View Post
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
 
Old 01-17-2010, 04:35 PM   #4
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
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.
 
Old 01-17-2010, 04:39 PM   #5
Musapha
LQ Newbie
 
Registered: Jan 2010
Distribution: Linux redhat 4 , centos 5.4
Posts: 3

Original Poster
Rep: Reputation: 0
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
 
Old 01-18-2010, 05:41 AM   #6
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
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
 
Old 01-18-2010, 05:40 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Have you tried the 'expect' tool?
 
Old 01-18-2010, 06:03 PM   #8
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
@ 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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to accept license agreement when installing java linux newb Ubuntu 4 08-17-2008 11:29 PM
How to accept comand line user agreement??? RugbyPete Linux - Newbie 7 05-02-2008 03:59 AM
Help Shellscript paraiso Linux - Newbie 7 05-12-2005 07:25 AM
Locked Archive or Installer to force end users to accept a license agreement diven Linux - General 1 05-03-2005 07:45 PM
ShellScript sharadgana Programming 1 12-16-2004 01:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration