title: Bash script to install the software
body: <p>I have bash script to install the tomcat and java, this will happen based on user selection inputs, this is working good as we expected. when the java and tomcat is not present it will configure one by one as per the below code. if the tomcat and java is already present then it will through the error in the terminal.</p>
  
  <pre><code>#!/bin/bash
  
  tomcat_base_dir=/sys/workers
  java_base_dir=/usr/lib/java
  software_location=/home/softwares/
  
  PS3='Please enter your choice: '
  clear
  
  echo "==========================="
  echo "Softeare Setup"
  echo "==========================="
  
  options=("Option 1: Tomcat Installation" "Option 2: Java Installation" "Option 3: Reply" "Quit")
  
  COLUMNS=12
  select opt in "${options[@]}"; do
          case $opt in
  
          "Option 1: Tomcat Installation")
                  echo "you chose choice 1"
  
                  echo "Tomcat Installation"
                  echo "================================================================"
                  if [ ! -d $tomcat_base_dir ]; then
                          echo "Error directory $tomcat_base_dir does not exists!"
                          mkdir -p /sys/workers
                          cp -r $software_location/apache*.gz $tomcat_base_dir
                          echo "tomcat file copied"
                          cd $tomcat_base_dir &amp;&amp; tar zxf apache*.gz -C . &amp;&amp; rm -rf apache*.gz &amp;&amp; mv a* tomcat
                          echo "Tomcat tar file removed and renamed as well"
                          echo "Tomcat Version"
                          tomcat_output="$(cd $tomcat_base_dir/bin &amp;&amp; ./version.sh | grep -i "Server version")"
                          echo "============================"
                          echo "${tomcat_output}"
                          echo "============================"
                  else
                          echo "$tomcat_base_dir directory found!"
                  fi
                  ;;
  
          "Option 2: Java Installation")
  
                  echo "you chocie 2"
                  echo "Java Installation"
                  echo "================================================================"
  
                  if [ ! -d $java_base_dir ]; then
                          echo "Error directory $java_base_dir does not exists!"
                          mkdir -p /usr/lib/java
                          cp -r $software_location/jre*.gz $java_base_dir
                          echo "java file copied"
                          cd $java_base_dir &amp;&amp; tar zxf jre*.gz -C . &amp;&amp; rm -rf jre*.gz &amp;&amp; mv j* jre
                          sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/java/jre/bin/java" 1
                          sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/java/jre/bin/javaws" 1
                          echo "Java Runtime Environment installtion completed"
                          java_output="$(java -version 2&gt;&amp;1 | head -n 1 | cut -d\" -f 2)"
                          echo "============================"
                          echo "${java_output}"
                          echo "============================"
                  else
                          echo "$java_base_dir directory found!"
                  fi
                  ;;
  
          "Option 3: Reply")
  
                  echo "Reply"
                  echo "================================================================"
                  echo "you chose choice $REPLY which is $opt"
                  ;;
  
          "Quit")
                  break
                  ;;
  
          *) echo "invalid option $REPLY" ;;
          esac
  done
  </code></pre>
  
  <p>Now the question is, I have to select all the options which ever i'm having inside my case, for example (option 1 java installation and option 2 tomcat installation) when i am selecting option 1, java will install and same case when i using option 2 tomcat will install.</p>
  
  <p>Now i want install both software's using the option all. </p>