: '%W% %G%' TMP="/usr/tmp" FILE='' GROUP='' OTHER='' TITLE='' while [ $# -gt 0 ] do case $1 in -t) TITLE=$2 shift ;; -n) GROUP=$2 shift ;; -f) FILE=$2 shift ;; *) OTHER="${OTHER} $1" ;; esac shift done while [ "${TITLE}x" = "x" ] do echo "Title: \c" read TITLE done if [ "${GROUP}x" = "x" ] then echo "Newsgroups (general): \c" read GROUP if [ "${GROUP}x" = x ] then GROUP="general" fi fi if [ "${FILE}x" != "x" ] then if [ -r ${FILE} ] then inews -t "${TITLE}" -n ${GROUP} ${OTHER}< $FILE exit else echo "$0: can not read ${FILE}" exit 1 fi fi FILE="${TMP}/pn$$" trap "sleep 1; cp $t $HOME/dead.article ; echo saved in $HOME/dead.article ; rm -f ${FILE}; exit" 0 1 2 touch ${FILE} ${EDITOR:-vi} ${FILE} if inews -t "${TITLE}" -n ${GROUP} ${OTHER} < ${FILE} then : else if cat ${FILE} >> ${HOME}/dead.news then echo "Article saved in ${HOME}/dead.news" fi fi