Threesuns

Email the Instructor

Contact

All Semesters

Semesters

All Courses

Courses

2013Spring

01.14.13 - 05.12.13

Introduction to UNIX/Linux

CSCI1483

Tuesday Thursday
01:30 PM - 02:50 PM

Scripting II Extra Credit

Lab09

Objective: To write a simple shell script

pastdue

Submit Your Solution

Lab09

Requirements

Script is complete and functioning0 pts
Total0 pts

Instructions

Write a shell script called "collect" that will:

Accept the name of a file as a command line argument. If a command line argument isn't given, display an error message and quit.

If an argument is given, test to confirm that the argument is the name of a file in the working directory. If the file exists, copy it to a "collection" directory in the home directory of the user running the script. If the file doesn't exist, display an error and exit.

The collection directory should be a directory called collection located below the current users home directory. Test for the existence of the collection directory and if it doesn't exist, create it before copying the file.

Document you program by adding comments to it.