home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / news / cnews.tar / util / queuelen.hdb < prev    next >
Text File  |  1994-09-15  |  504b  |  30 lines

  1. #! /bin/sh
  2. # Find size of current queue of news outbound to $1.  HDB/BNU version.
  3.  
  4. # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  5. . ${NEWSCONFIG-/etc/news/bin/config}
  6.  
  7. PATH=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH ; export PATH
  8. umask $NEWSUMASK
  9.  
  10. if test -d /usr/spool/uucp
  11. then
  12.     cd /usr/spool/uucp
  13. elif test -d /var/spool/uucp
  14. then
  15.     cd /var/spool/uucp
  16. else
  17.     echo "$0: can't find uucp spool directory" >&2
  18.     echo 9999
  19.     exit 1
  20. fi
  21. grade=d
  22.  
  23. if test -d $1
  24. then
  25.     cd $1
  26.     ls | egrep "^C\..*$grade....\$" | wc -l
  27. else
  28.     echo 0
  29. fi
  30.