home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff319.lzh / CNewsSrc / cnews.orig.lzh / relay / ctl / sendsys < prev    next >
Text File  |  1989-06-27  |  583b  |  18 lines

  1. #! /bin/sh
  2. # sendsys - mail sys file to sender identified in stdin's headers
  3.  
  4. # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  5. . ${NEWSCONFIG-/usr/lib/news/bin/config}
  6. export NEWSCTL NEWSBIN NEWSARTS
  7. PATH=$NEWSCTL/bin:$NEWSBIN/relay:$NEWSBIN:$NEWSPATH ; export PATH
  8. umask $NEWSUMASK
  9.  
  10. SENDER="`newsreply`"
  11. (echo "Subject: response from `newshostname` to your sendsys"; echo "";
  12. case "$1" in
  13. "")    cat $NEWSCTL/sys ;;
  14. *)    awk -f $NEWSBIN/relay/canonsys.awk $NEWSCTL/sys | egrep "^$1:" ;;
  15. esac ) | mail "$SENDER"
  16. echo "$NEWSCTL/sys file has been sent to $SENDER.  Remain calm." | mail $NEWSMA
  17. TER
  18.