home *** CD-ROM | disk | FTP | other *** search
- :
- # A variation of this can be included to execute from cron
- # to automatically take all files from a chosen directory
- # and archive them to a tidy directory
- #
- # In this case, all files in "/usr/spool/lbgm/src" are archived
- # into the "/u/archive" directory.
- #
- # Since all lbgm-generated file name start with an upper case
- # letter, select [A-Z]* (this ignores the save.log file).
- #
- # After the files are archived, the lbgm directory is cleaned.
- # ("empty" makes a zero-length file).
-
- # Any errors are reported by mail from cron.
-
- cd /usr/spool/lbgm/src
- /usr/lib/news/arcnews [A-Z]* /u/archive
- case $? in
- 0) rm [A-Z]*
- /local/bin/empty save.log;;
- esac
-