Computer scienceSystem administration and DevOpsCommand lineBash syntax

Case statement and argument parsing

Sort and indent

Report a typo

Format the following lines from a bash script to create a functional case statement. Consider the following schedule;

  • Sunday -> Closed
  • Others -> 09:00 - 16:00

Remember to indent the lines properly.

Reorder lines using drag or arrows. Adjust indentation with left buttons
                *)
              
                #!usr/bin/env bash
              
                Sun)
              
                echo "Closed all day";;
              
                echo "09:00 - 16:00";;
              
                case $1 in
              
                esac
              
___

Create a free account to access the full topic