Programming Tools & Computer Science I

CSC 185 & 201, Spring 2013, Northern Virginia Community College

Homework 10: Bash scripting



May 8, 11:59PM

To submit:

Do the work listed below in your home directory on our server, and send an email to me at with subject CSC 185 HW10 when you're done.


  1. Create a folder called hw10 in your home directory. Change permissions to ensure that no one besides you can see inside it, and do the rest of your work in that folder.
  2. Create a script called hello that takes a single name as an argument and prints a greeting to the name. For example, running hello Joel should print "Hello Joel!".
  3. Create a script called backup that copies a file to a new name that incorporates the current date. For example, something like renaming file1.txt to file1.txt.backup-2013-04-30. Run man date to see how to get the current date in a format that you would like.
  4. Create a script called recycle that acts as a somewhat safer replacement for the rm command, moving the input files to ~/RECYCLE-BIN instead of deleting them. Optional: have your command keep a log of the original locations of each file, in order to let you undelete them back to their original locations later.