{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

uli101.a2.start - DO NOTE REMOVE OR CHANGE THIS BLOCK...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
############################################################################### # DO NOTE REMOVE OR CHANGE THIS BLOCK # ASSIGNMENTS COMPLETED WITHOUT THIS BLOCK INTACT WILL NOT BE GRADED # # ULI101 - WINTER 2010 # ASSIGNMENT 2 BY: Ming Zhang # [email protected] # # BIGBROTHER COMMAND VERIFIES THAT YOU COMPLETED THE WORK INDEPENDENTLY # BY RECORDING YOUR PROGRESS AND COLLECTING STATISTICAL DATA # IF YOU DELETE OR DAMAGE THE COMMAND BELOW BY ACCIDENT, YOU CAN RETRIEVE # THE ORIGINAL FILE BY ISSUING THE ASSIGNMENT START COMMAND AGAIN bigbrother 908d1fd93c27c145454d1627b3129aca96d01d97 ############################################################################### ### TO DO: Check if source directory is given as parameter, exit status 1 on error ### TO DO: Check if source is a directory, exit istatus 2 on error # Check the source directory is absolute or relative-to-home, exit on error echo "$1" | grep "^/" > /dev/null if [ "$?" -ne 0 ] then echo "Source must be an absolute or relative-to-home path" exit 3 fi # Set the destination directory to ~/public_html if not given as argument test "$#" -lt 2 && set $2 ~/public_html # Create the destination directory if it does not exist # Exit with a status code 7 if directory cannot be created
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}