#if [ -e $4 ] #Checks to see if the file exists, if it does it asks if you wnat to overwrite or not # then # echo -e -n "\nMessage: File \"$4\" Already Exists. \nWould you like to overwrite the file? (y/n) " # read answer #loooks for the answer yes or no # case $answer in # y) echo -e "\nOverwrite Selected. Overwriting file...";; # n) echo -e "\nNo Overwtite Selected. Exiting the script..." # exit 19;; # *) echo -e "\nInvalid Input selected. Now exiting the script..." # exit 19;; # esac # else # until [ $selection = 5 ] #waits until the selection is 5 then exits the loop # do # case selection in # 1) clear; echo -e -n $options #makes sure the script doesn't exit and waits for the user input. # echo "Main menu option $selection selected press any key" # read selection;; # 2) clear; echo -e -n $options # echo "Main menu option $selection selected press any key" # read selection;; # 3) clear; echo -e -n $options # # echo "Main menu option $selection selected press any key" # read selection;; 4) clear; echo -e -n $options # read selection # echo -e "\\n Main Menu option \"$selection\" selected. \\n Press the key to continue..."; read;; # *) clear; echo -e -n $options # read selection;; # esac # clear # done # exit # fi