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