home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume7 / arcnews / arccron.SH < prev    next >
Encoding:
Text File  |  1989-07-02  |  652 b   |  23 lines

  1. :
  2. #    A variation of this can be included to execute from cron
  3. #    to automatically take all files from a chosen directory
  4. #    and archive them to a tidy directory
  5. #
  6. #    In this case, all files in "/usr/spool/lbgm/src" are archived
  7. #    into the "/u/archive" directory.
  8. #
  9. #    Since all lbgm-generated file name start with an upper case
  10. #    letter, select [A-Z]* (this ignores the save.log file).
  11. #
  12. #    After the files are archived, the lbgm directory is cleaned.
  13. #    ("empty" makes a zero-length file).
  14.  
  15. #    Any errors are reported by mail from cron.
  16.  
  17. cd /usr/spool/lbgm/src
  18. /usr/lib/news/arcnews [A-Z]* /u/archive
  19. case $? in
  20. 0)    rm [A-Z]*
  21.     /local/bin/empty save.log;;
  22. esac
  23.