Question: Please assist with this question, The code I am using is not giving me the correct error message for the incorrect language entered request in

Please assist with this question, The code I am using is not giving me the correct error message for the incorrect language entered request in run 3 below. Here is the code I have so far:

echo "===============================" echo "Developer: Put Your Name Here" echo "===============================" shopt -s nocasematch #for case insensitive comparison

echo -e "Which is first language? " read fLang choice=" " a="--" cLang=( -- english spanish chinese italian hindi -- )

for i in ${cLang[@]} do if [[ "$i" == "$fLang" ]]; then choice=$i fi done

if [[ "${choice}" == " " ]]; then echo -e " ERROR:Failed to find first language: Your first language is not in the list " else echo "Choose any two of them " for i in ${cLang[@]} do if [[ "$i" == "$a" ]]; then echo elif [[ "$i" != "$fLang" ]]; then printf '%s ' "$i" fi done fi

Thank you

Here is the full question below.

 Please assist with this question, The code I am using is

Write a bash script to tell a student, what language courses he/she is eligible to take based on his/her First Language. Limit the languages only to English, Spanish, Chinese, Italian, Hindi. Ask the user to enter his/her First Language. If any one of the above languages is entered as the first language, the stude not listed in the 5 la

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!