Computer scienceSystem administration and DevOpsCommand lineBash syntax

Conditional statements and test checks

Check for directory

Report a typo

Arrange the following blocks of code so that they check if the directory /sandbox/marvel/ironman exists. If the directory doesn't exist, it should be created. And if it does exist, the message Ironman exists! should be printed.

Reorder lines using drag or arrows. Adjust indentation with left buttons
                mkdir /sandbox/marvel/ironman
              
                echo "Ironman exists!"
              
                if [ -d /sandbox/marvel/ironman ]; then
              
                else
              
                fi
              
___

Create a free account to access the full topic