home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 1 / GoldFishApril1994_CD2.img / d4xx / d473 / cnewssrc / cnews_src.lzh / relay / amiga / delgroup.e < prev    next >
AmigaDOS Script File  |  1991-01-04  |  735b  |  32 lines

  1. .key GROUP/M
  2. .bra [
  3. .ket ]
  4. ; delgroup - delete a newsgroup, locally only
  5.  
  6. PATH=$NEWSCTL/bin:$NEWSBIN/maint:$NEWSBIN:$NEWSPATH ; export PATH
  7.  
  8. echo "Usage: $0 groupname"
  9.  
  10. grep -x "[GROUP]" NewsCtl:active
  11. if val $RC ne 0
  12.     echo "[GROUP] does not exist!"
  13.     quit 10
  14. endif
  15.  
  16. Lab Again
  17. if Exists T:Cnews.lock
  18.     wait 45
  19.     SkipBack again
  20. endif
  21. echo >T:Cnews.lock "delgroup"
  22.  
  23. rename NewsCtl:active NewsCtl:active.old
  24. fgrep >NewsCtl:active -v "[GROUP] " NewsCtl:active.old
  25. delete T:Cnews.lock
  26.  
  27. ; These next lines are not essential, so we leave them out...
  28. ; awk "\$1 != \"$1\"" active.times >active.times.t
  29. ; mv active.times active.times.o && mv active.times.t active.times
  30.  
  31. echo "You may wish to delete the NewsArts:[GROUP] directory at some point."
  32.