Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899