something like motd question

D'Arcy J.M. Cain darcy at druid.uucp
Sat May 18 22:25:27 AEST 1991


In article <1991May17.230644.15016 at unixland.uucp> Bill Heiser writes:
>news: index logins numbers
>
>doesn't really mean much to the novice users among my users...

It isn't necessary for the users to know how to use news.  Simply create
your message files in the correct directory (/usr/news) and put this line
in /etc/profile:
    news
this will print all the files in /usr/news that this user hasn't seen yet.
You probably already have something like "news -n" in your /etc/profile
which will cause a list of unread news to be listed on the user's terminal
when they log in.  The can then type "news" if they wish to read them.  Read
the man page on news for details.  Here is a possible script to hold the
user's hand (off the top of my head):

  if [ ! "`news -s`" = "No news." ]
  then
    echo "The following news articles have not been read by you:"
    news -n
    echo "\nDo you want to read them now? [y]\c"
    read ans
    if [ "$ans" = "y" -o "$ans" = "Y" -o "$ans" = "" ]
    then
      clear
      news
    else
      echo "When ready to read news enter \"news\" at any prompt"
    fi
  fi

-- 
D'Arcy J.M. Cain (darcy at druid)     |
D'Arcy Cain Consulting             |   There's no government
Toronto, Ontario, Canada           |   like no government!
+1 416 424 2871                    |



More information about the Comp.unix.admin mailing list