home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume4 / unaxcess / part1 / Utilities / umotd.sh < prev    next >
Encoding:
Text File  |  1986-11-30  |  551 b   |  22 lines

  1. :
  2. : "%W% %E% %U% ncoast!bsa %Z%"
  3. : "%Z% Copyright (C) 1986 by Brandon S. Allbery, All Rights Reserved %Z%"
  4. :
  5.  
  6. UADIR="`sed -n 's/^@UAOWNER@:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):[^:]*$/\1/p' < /etc/passwd`"
  7.  
  8. msgnum=`cat $UADIR/motd/himotd`
  9. case "$msgnum" in
  10. [0-9]*)    ;;
  11. *)    echo "$msgnum" >&2
  12.     exit 1
  13. esac
  14. msgnum=`expr $msgnum + 1`
  15. if echo "UNaXcess V0.04.03 (Pre-release) -- `@udate@`
  16. " > $UADIR/motd/$msgnum 2>/dev/null
  17. then    ${EDITOR-vi} $UADIR/motd/$msgnum
  18.     echo $msgnum > $UADIR/motd/himotd
  19. else    echo "$0: could not make new bulletin $msgnum"
  20.     exit 1
  21. fi
  22.