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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-17-2010, 01:43 PM
|
#1
|
LQ Newbie
Registered: Jan 2010
Distribution: Linux redhat 4 , centos 5.4
Posts: 3
Rep:
|
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
|
|
|
01-17-2010, 01:53 PM
|
#2
|
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
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.
|
|
|
01-17-2010, 05:23 PM
|
#3
|
LQ Newbie
Registered: Jan 2010
Distribution: Linux redhat 4 , centos 5.4
Posts: 3
Original Poster
Rep:
|
im affraid
Quote:
Originally Posted by GrapefruiTgirl
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
|
|
|
01-17-2010, 05:35 PM
|
#4
|
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
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.
|
|
|
01-17-2010, 05:39 PM
|
#5
|
LQ Newbie
Registered: Jan 2010
Distribution: Linux redhat 4 , centos 5.4
Posts: 3
Original Poster
Rep:
|
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
|
|
|
01-18-2010, 06:41 AM
|
#6
|
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
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
|
|
|
01-18-2010, 06:40 PM
|
#7
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,426
|
Have you tried the 'expect' tool?
|
|
|
01-18-2010, 07:03 PM
|
#8
|
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
@ 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 06:38 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|