LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 02-06-2010, 01:09 AM   #1
aditi
LQ Newbie
 
Registered: Feb 2010
Posts: 3

Rep: Reputation: 0
Question how to automate an installation script suppressing user interaction


Hello All,

Im new to linux and this is my first post...

Im working on ubuntu and i need to install glassfish on my machine often. I want to write a script which can automate this installation and the post installation work so that I can run this script when i leave office and have everything done by the time I reach office the next day.

But after running the installation command there will be a license agreement which i need to accept by typing "A" at the console. Now How I can automate this so that the scipt can take this from a txt file? Please help.....


mv /home/liferay-portal-glassfish-linux-5.2.3.jar /opt/argon/
cd /opt/argon
java -Xmx256m -jar liferay-portal-glassfish-linux-5.2.3.jar

<Here The console expects to type "A" accepting the lisence agreement>

cd glassfish
chmod -R +x lib/ant/bin
......
....
....
...
 
Old 02-06-2010, 06:56 AM   #2
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 97
This can be done using a program named expect. It takes some
time to learn, but it is worth it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
needed help in ruby script where user interaction is necessary? wrapster Programming 10 08-08-2008 02:50 AM
Needed help in a ruby script with user interaction involved! wrapster Solaris / OpenSolaris 2 08-06-2008 11:47 PM
How to program shell script to automate mass user account creation? EsAsher Linux - General 2 06-30-2007 09:41 AM
LXer: Speaking Unix, Part 6: Automate, automate, automate! LXer Syndicated Linux News 0 01-04-2007 10:54 AM


All times are GMT -5. The time now is 08:24 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration