#!/bin/sh

  PATH=/bin:/usr/bin:/usr/ucb

  myname=`whoami` 2>/dev/null
  if [ $? != 0 ]
  then
	echo "whoami not found, using the \$LOGNAME variable. Coherent?"
	myname=$LOGNAME
  fi

  echo -n "Enter newsgroup name: "
  read group
  echo -n "Enter description (why is this group to be deleted): "
  read descr
  echo -n "Enter distribution: [local] "
  read dist
  [ "$dist" = "" ] && dist=local

  echo $descr |
  /usr/lib/news/inews -t "cmsg rmgroup $group" -n "$group" -d "$dist"\
			-a $myname -c "rmgroup $group"

  echo "Newsgroup $group DELETED."

  exit 0
