Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assumed that you are given the following code: $ cat case_1.sh #! /bin/bash # # demonstrates how the case statement works echo -n Enter A,

Assumed that you are given the following code: $ cat case_1.sh #! /bin/bash # # demonstrates how the case statement works echo -n "Enter A, B, or C: " read letter case $letter in A) echo You entered A ;; B) echo You entered B ;; C) echo You entered C ;; *) echo You did not enter A, B, or C ;; esac echo Exiting program 75. What will be the result if you run the line below $ ./case_1.sh Enter A, B, or C: A Assumed that you are given the following code: We can use | to accept letters of either case $ cat case_2.sh #! /bin/bash # # demonstrates the use of the | (logical or) # operator in patterns within a case statement echo -n "Enter A, B, or C: " read letter case $letter in a|A) echo You entered A ;; b|B) echo You entered B ;; c|C) echo You entered C ;; *) echo You did not enter A, B, or C 8 ;; esac echo Exiting program 76. What will be the result if you run the line below $ ./case_2.sh Enter A, B, or C: A 77. What will be the result if you run the line be

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

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions