Script which takes two inputs based on that execute othe scripts

Hi,
I am using solaris 10 bash shell.this might a small script but i am not much familiar with scripting.

My requirement here is script should prompt for users two opions like this
"please select either any one option makefile or make& build file".

if the user selects make file option then it should run the followin command
gen -c

if the user selects make and build option it should run the following command
gen clean all.

Advnace thanks for the response.

echo "Please enter M for make file and B for make and build file, followed by [ENTER]:"
read option_mb

if [[ "$option_mb" == "M" ]]
then
  command for make file
else
  if [[ "$option_mb" == "B" ]]
  then
    command for make and build file
  else
    echo "Enter correct option"
  fi
fi
1 Like

Thanks Mate for the response.Cheers