LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-28-2013, 04:56 AM   #1
rohaanembedded
Member
 
Registered: May 2013
Location: India
Distribution: Ubuntu 11.10
Posts: 178

Rep: Reputation: Disabled
Question shell script issue how to pass the license exceptance as yes through script


i want to install the jai-1_1_3-lib-linux-i586-jdk.bin through shell script but in between it asks for the except license condition where we have to say "yes". i want to pass this yes from the same script how it can be done

My script is

Code:
#!/bin/bash


cp Downloads/jai-1_1_3-lib-linux-i586-jdk.bin /usr/lib/jvm/java-6-openjdk/


chmod 777 /usr/lib/jvm/java-6-openjdk/jai-1_1_3-lib-linux-i586-jdk.bin


cd /usr/lib/jvm/java-6-openjdk/


./jai-1_1_3-lib-linux-i586-jdk.bin
~                                                                                                                                             
~

when i run this script it stops where the license appear i want to send yes to it so that it will complete the installation in one go

please help me in this

Thanks
rohaan
 
Old 06-28-2013, 08:00 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Try using yes (man yes for details):
Code:
yes yes | ./jai-1_1_3-lib-linux-i586-jdk.bin
Make sure the bold part reflects what is expected by the installer.
 
1 members found this post helpful.
Old 06-28-2013, 08:42 AM   #3
rohaanembedded
Member
 
Registered: May 2013
Location: India
Distribution: Ubuntu 11.10
Posts: 178

Original Poster
Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by druuna View Post
Try using yes (man yes for details):
Code:
yes yes | ./jai-1_1_3-lib-linux-i586-jdk.bin
Make sure the bold part reflects what is expected by the installer.
Dear sir,


greattttt it worked fine. thank you very very much

But there is one one thing in this command i have to read the license means i have press enter till get get over and then it doesnt ask for "yes"
it looks like
Code:
Sun Microsystems, Inc.
Binary Code License Agreement

JAVA ADVANCED IMAGING API, VERSION 1.1.3

READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED SUPPLEMENTAL LICENSE TERMS (COLLECTIVELY "AGREEMENT") CAREFULLY BEFORE OPENING THE SOFTWARE
 MEDIA PACKAGE.� BY OPENING THE SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE TERMS OF THIS AGREEMENT.� IF YOU ARE ACCESSING THE SOFTWARE ELECTRON
ICALLY, INDICATE YOUR ACCEPTANCE OF THESE TERMS BY SELECTING THE "ACCEPT" BUTTON AT THE END OF THIS AGREEMENT.� IF YOU DO NOT AGREE TO ALL TH
ESE TERMS, PROMPTLY RETURN THE UNUSED SOFTWARE TO YOUR PLACE OF PURCHASE FOR A REFUND OR, IF THE SOFTWARE IS ACCESSED ELECTRONICALLY, SELECT 
THE "DECLINE" BUTTON AT THE END OF THIS AGREEMENT. 

1.� LICENSE TO USE.� Sun grants you a non-exclusive and non-transferable license for the internal use only of the accompanying software and d
ocumentation and any error corrections provided by Sun (collectively "Software"), by the number of users and the class of computer hardware f
or which the corresponding fee has been paid. 

2.� RESTRICTIONS.� Software is confidential and copyrighted. Title to Software and all associated intellectual property rights is retained by
 Sun and/or its licensors.� Except as specifically authorized in any Supplemental License Terms, you may not make copies of Software, other t
han a single copy of Software for archival purposes.� Unless enforcement is prohibited by applicable law, you may not modify, decompile, or r
everse engineer Software.� Licensee acknowledges that Software is not designed or intended for use in the design, construction, operation or 
maintenance of any nuclear facility. Sun Microsystems, Inc. disclaims any express or implied warranty of fitness for such uses. � No right, t
itle or interest in or to any trademark, service mark, logo or trade name of Sun or its licensors is granted under this Agreement. 

3.  LIMITED WARRANTY.� Sun warrants to you that for a period of ninety (90) days from the date of purchase, as evidenced by a copy of the rec
eipt, the media on which Software is furnished (if any) will be free of defects in materials and workmanship under normal use.� Except for th
e foregoing, Software is provided "AS IS".� Your exclusive remedy and Sun's entire liability under this limited warranty will be at Sun's opt
ion to replace Software media or refund the fee paid for Software. 

4.� DISCLAIMER OF WARRANTY.� UNLESS SPECIFIED IN THIS AGREEMENT, ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
 ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT THES
E DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. 

5.� LIMITATION OF LIABILITY.� TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROF
IT OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED REGARDLESS OF THE THEORY OF LIABILITY, AR
ISING OUT OF OR RELATED TO THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.� In no e
vent will Sun's liability to you, whether in contract, tort (including negligence), or otherwise, exceed the amount paid by you for Software 
under this Agreement.� The foregoing limitations will apply even if the above stated warranty fails of its essential purpose. 

6.� Termination.� This Agreement is effective until terminated.� You may terminate this Agreement at any time by destroying all copies of Sof
tware.� This Agreement will terminate immediately without notice from Sun if you fail to comply with any provision of this Agreement.� Upon T
ermination, you must destroy all copies of Software. 

7.  Export Regulations. All Software and technical data delivered under this Agreement are subject to US export control laws and may be subje
ct to export or import regulations in other countries.� You agree to comply strictly with all such laws and regulations and acknowledge that 
you have the responsibility to obtain such licenses to export, re-export, or import as may be required after delivery to you. 

8.� U.S. Government Restricted Rights.� If Software is being acquired by or on behalf of the U.S. Government or by a U.S. Government prime co
ntractor or subcontractor (at any tier), then the Government's rights in Software and accompanying documentation will be only as set forth in
 this Agreement; this is in accordance with 48 CFR 227.7201 through 227.7202-4 (for Department of Defense (DOD) acquisitions) and with 48 CFR
 2.101 and 12.212 (for non-DOD acquisitions). 
--More--
i have to press Enter till this --More-- ends


suggest anything if it can be resolved

Thanks & Regards
Rohaan
 
Old 06-28-2013, 09:13 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
I'm not sure, but isn't there a "silent install" option available (it has been a long time ago I installed jdk this way). You might want to spend some time checking that out.

Anyway, have a look here: Java JDK Silent Install Help

And this concept might be of interest: Auto Install the SUN JDK on Linux
 
1 members found this post helpful.
Old 06-28-2013, 01:02 PM   #5
rohaanembedded
Member
 
Registered: May 2013
Location: India
Distribution: Ubuntu 11.10
Posts: 178

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
I'm not sure, but isn't there a "silent install" option available (it has been a long time ago I installed jdk this way). You might want to spend some time checking that out.

Anyway, have a look here: Java JDK Silent Install Help

And this concept might be of interest: Auto Install the SUN JDK on Linux
Thank you Very much

i will try look in to this n hopefully i will manage
thanks again for rply

Regards
rohaan
 
Old 07-03-2013, 01:46 AM   #6
rohaanembedded
Member
 
Registered: May 2013
Location: India
Distribution: Ubuntu 11.10
Posts: 178

Original Poster
Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by druuna View Post
I'm not sure, but isn't there a "silent install" option available (it has been a long time ago I installed jdk this way). You might want to spend some time checking that out.

Anyway, have a look here: Java JDK Silent Install Help

And this concept might be of interest: Auto Install the SUN JDK on Linux
Dear sir,

i tried the silent installation as per your LINK suggestion at worked smoothly Thank you very much for such clean and straight rply
it helped me very much
i tried following command in my script like
Code:
./jai-1_1_3-lib-linux-i586-jdk.bin >/dev/null < <(echo y) >/dev/null < <(echo y)
thanks again
Regards
rohaan
 
  


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
Issue in running commands in expect script from shell script yadvinder Programming 0 05-31-2012 04:07 AM
How to pass command line arguments from one shell script to another shell script VijayaRaghavanLakshman Linux - Newbie 5 01-20-2012 09:12 PM
how to pass MySQL user/pass securely in shell script? digity Linux - Newbie 5 01-07-2010 05:48 AM
pass variable from one shell script into another shell script xskycamefalling Programming 9 10-03-2009 01:45 AM
Shell script help: How to pass a directory path to the script? dv502 Programming 13 09-10-2008 03:07 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:31 PM.

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