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
Get step-by-step solutions from verified subject matter experts
