Question: 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

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:

#!/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

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!