Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Inference Control In Statistical Databases From Theory To Practice Lncs 2316

Authors: Josep Domingo-Ferrer

2002nd Edition

3540436146, 978-3540436140

More Books

Students also viewed these Databases questions

Question

Define workplace ergonomics.

Answered: 1 week ago