Script to Hit 'Enter' key multiple times in bash script.
UbuntuThis forum is for the discussion of Ubuntu Linux.
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.
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.
Script to Hit 'Enter' key multiple times in bash script.
hi,
I am trying to install jira on ubuntu 10.04 64 bit through terminal using .bin file.
during installation i want to hit "enter" key multiple times to finish installation.i need the bash script to do it successfully.
following are the messages i am getting during installion:
This will install JIRA 5.1 on your computer.
OK [o, Enter], Cancel [c]
Choose the appropriate installation or upgrade option.
Please choose one of the following:
Express Install (use default settings) [1], Custom Install (recommended for advanced users) [2, Enter], Upgrade an existing JIRA installation [3]
Where should JIRA 5.1 be installed?
[/opt/atlassian/jira]
Default location for JIRA data
[/var/atlassian/application-data/jira]
Configure which ports JIRA will use.
JIRA requires two TCP ports that are not being used by any other
applications on this machine. The HTTP port is where you will access JIRA
through your browser. The Control port is used to Startup and Shutdown JIRA.
Use default ports (HTTP: 8080, Control: 8005) - Recommended [1, Enter], Set custom value for HTTP and Control ports [2]
JIRA can be run in the background.
You may choose to run JIRA as a service, which means it will start
automatically whenever the computer restarts.
Install JIRA as Service?
Yes [y, Enter], No [n]
just install it normally, get the properties file and uninstall it.
thank you acid kewpie for helping me...i dont want to do it directly,because i am trying to deploy jira in a virtual machine using vFabric app director
i found the solution...my script is as follows:
VAR=$(expect -c "
expect \"This will install JIRA 5.1 on your computer.\"
send \"\r\"
expect \"Choose the appropriate installation or upgrade option.\"
send \"\r\"
expect \"Where should JIRA 5.1 be installed?\"
send \"\r\"
expect \"Choose the appropriate installation or upgrade option.\"
send \"\r\"
expect \"Default location for JIRA data\"
send \"\r\"
expect \"Configure which ports JIRA will use.\"
send \"\r\"
expect \"JIRA can be run in the background.\"
send \"\r\"
you don't understand what I said do you? You're doing this a dozen, a hundred times, and clearly you've already installed it once. You just save that properties file from the test install and replicate it as many times as you want. Expect is definitely NOT the way to do this.
you don't understand what I said do you? You're doing this a dozen, a hundred times, and clearly you've already installed it once. You just save that properties file from the test install and replicate it as many times as you want. Expect is definitely NOT the way to do this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.