: '@(#)postnews.usg 2.8 4/23/83' if test $# -gt 1 ; then /bin/echo "$0: Too many args" exit 1 fi if test $# -eq 1 -a ! -r "$1" ; then /bin/echo "$0: Can't read $1" exit 1 fi /bin/echo "Subject: " \\c read title /bin/echo "Newsgroups (general): " \\c read ng if test x$ng = x ; then ng=general fi /bin/echo "Distribution ($ng): " \\c read dist if test x$dist = x; then dist=$ng fi t=/tmp/pn$$ case $# in 0) trap "sleep 1; cp $t $HOME/dead.article ; /bin/echo saved in $HOME/dead.article ; rm -f $t; exit" 1 trap "" 2 /bin/echo "Subject: $title" > $t /bin/echo "Newsgroups: $ng" >> $t if test $dist != $ng; then /bin/echo "Distribution: $dist" >> $t fi ${EDITOR:-vi} $t cd /tmp if inews -h <$t then : else if cat $t >>$HOME/dead.article then /bin/echo Article saved in $HOME/dead.article fi fi ;; 1) cp $1 $t cd /tmp inews -t "$title" -n $ng < $t & ;; esac rm -f $t