I have two very simple scripts, or maybe better call one a wrapper for the another.Here comes the wrapper:#!/usr/bin/expectset timeout 20spawn ./installOracleDatabase.shexpect replace Disk1/upgrade/gen_inst.sql? { send N\r }expect Specify the HTTP port that will be used for Oracle Application Express { send \r }expect Specify a port that will be used for the database listener { send \r }expect initial configuration: { send root\r }expect Confirm the password: { send root\r }expect Do you want Oracle Database 11g Express Edition to be started on boot { send y\r }And here is the main script:#!/bin/bash#install required libraries and programssudo yum -y install libaio bc flex unzip#unzipping the Oracle packageunzip -q oracle-xe-11.2.0-1.0.x86_64.rpm.zipcd Disk1sudo rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpmsudo /etc/init.d/oracle-xe configurecat . /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh >> $HOME/.bashrcThe problem with the second script is, that after the last step in sudo /etc/init.d/oracle-xe configure, when the configuring script is asking Do you want Oracle (...) to be started on boot, right after that step, during the normal installation, Oracle is doing some other steps:Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]:yStarting Oracle Net Listener...DoneConfiguring database...DoneStarting Oracle Database 11g Express Edition instance...DoneInstallation completed successfully.This step is taking some time. But my script is exiting right after answering y to the last question...How can I force the script to wait for the whole configuration to finish?
How to make a script wait for an operation to finish?
software installation;expect;oracle