# # rc.local.s20.mmmyy # Archive the message to directory archive/Jul94 etc. # and preserve the number it got. # # Author: Hans-Albert Schneider, Siemens AG, # # July, 1994 # Copyright (C) Siemens AG # :0 * ARCHIVE ?? . { # ARCHIVE is set # `date '+%h%y'` will result in directories archive/Jan99 etc. # `date '+%Y/%m'` will result in directories archive/1999/01 etc. month=`date '+%h%y'` archive2="archive/$month" # If the html_archive directory does not exist, create it. # If you need to create more than one level of directories, # like /where/ever/my-cool-list/html/1999/Jan etc., replace # "mkdir" by "mkdir -p" (or "mkdirhier", or whatever does the # job on your system). # # The variable "result" is not used; it just allows us to use # the backticks to invoke a UNIX command. result=`test -d $archive2 || mkdir $archive2` :0 c hi | ln ${ARCHIVE} ${archive2} }