Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The output of this script is shown below. The script needs to match the output, meaning there are errors in the current script that is

The output of this script is shown below. The script needs to match the output, meaning there are errors in the current script that is not outputting what is desired.

There are four (4) problems with this script. Below is example output of the script:

./4-case.sh usage: ./4-case.sh ./4-case.sh start Starting process echo $? 0 ./4-case.sh stop Stopping process ./4-case.sh restart Restarting process ./4-case.sh reload Reloading process ./4-case.sh magic Unrecognized command magic echo $? 255

---------------------------------------------------------------------------------------------------------

The script that needs to be adjusted to meet the output:

#!/bin/bash

if [[ -z $1 ]] then echo "usage: $0 " exit -1 fi

case "$1" in 'start' ) echo "Starting process" ;; 'stop' ) echo "Stopping process" 'restart' ) echo "Restarting process" ;; 'reload' ) echo "Reloading process" done exit 0

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 2 Lnai 9285

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Joao Gama ,Alipio Jorge ,Carlos Soares

1st Edition

3319235249, 978-3319235240

More Books

Students also viewed these Databases questions

Question

19. What does fMRI measure?

Answered: 1 week ago