#!/usr/bin/sh # File: archive if test -d $1 then filename=$1.`date '+%m.%d.%y.%H.%M'.tar` # tar and gzip the files in directory given on the command line tar -cf $filename $1/ gzip $filename # remove the directory and all the files in it rm -r $1 fi