How to call different scripts?

I have 3 different scripts with 3 different functions, I would like to merge these 3 and make a master script.
The following are my ideas:

  • ask user to pick which script he needs
  • after choosing, point it to the right script

or...
depending on the inputs provided by the user, all three scripts should be run.

They are graph output, so all 3 graphs must be displayed.

I think the first scenario is more easier.

Is there a way to do so? Please help?

while :
do
echo "Please input the type of script you want"
read "X";

case $X in

script1)
          echo "You selected $X";
          source /path/to/script1;
          ;;

script2)
          echo "You selected $X";
          source /path/to/script2;
          ;;
script3)
          echo "You selected $X";
          source /path/to/script3;
*)
         echo "Valid Choices are"
         echo "script1, script2 or script3"
         exit;
         ;;
esac
done

---------- Post updated at 04:39 PM ---------- Previous update was at 04:39 PM ----------

adjust the names and paths as per your actual requirement.