Question
(Linux) 1. Create the directory ~/bin/ 2. Copy the below script to ~/bin/mystery.sh 3. Make mystery.sh executable 4. Run the script 5. Complete the program
(Linux)
1. Create the directory ~/bin/ 2. Copy the below script to ~/bin/mystery.sh 3. Make mystery.sh executable 4. Run the script 5. Complete the program header to include a summary description of what the script does. 6. Paste onto a blank page a copy of the completed script header and the output of at least two successful runs of the script (where exit status = 0) with differing output.
#!/bin/sh # File name: mystery.sh # Date Written: A long time ago # Purpose: Mystery script # Description: # # # # if [ $# -ne 1 ] then echo Usage: $0 directory exit 1 elif [ ! -d $1 ] then echo $1 is not a directory exit 2 fi dir=$1 cd $dir files=* echo $dir echo $files exit 0
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started