Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Key Assignment The final submission will have you complete your Key Assignment,

ID: 3538104 • Letter: K

Question

Key Assignment

The final submission will have you complete your Key Assignment, and submit a single document containing all of the material that you worked on in the class.

Part 1 Tasks (Objectives From Week 5): Create a script to automate the commands designed and developed in Weeks 1 %u2013 4)

This assignment will give you the opportunity to automate the commands that you have designed and developed in the previous assignments.

Students should submit a single shell script that will:

Name the document "first-initial_lastname-CS126.sh."

Part 2 Tasks (Objectives From Week 5): Finalize your Key Assignment

(Objectives From Weeks 1%u20134)

As the class has progressed, you have learned about and written commands that allow you to develop an environment to maintain your class material on a UNIX system. Up to this point, you have covered the following:

Explanation / Answer

#!/bin/bash
# XXXXX: T. Meadors
C=Y
while [[ $C = "Y" ]]
do
echo "1. pwd"
echo "2. ls"
echo "9. exit"
read -p "Enter value: " val
case $val in

1) pwd
;;
2) ls monkey.dat &> /dev/null
if [[ ! $? -eq 0 ]]
then
echo Error - create monkey.dat
else
echo monkey.dat exists
fi
;;
9) exit
;;

*) echo "no match"
;;
esac
read -p "Continue (Y/N): " C
done