Annotation of researchv10dc/cmd/netnews/src/postnews.v7, revision 1.1.1.1

1.1       root        1: : '@(#)postnews.v7     2.8     4/23/83'
                      2: if test $# -gt 1 ; then
                      3:        /bin/echo "$0: Too many args"
                      4:        exit 1
                      5: fi
                      6: if test $# -eq 1 -a ! -r "$1" ; then
                      7:        /bin/echo "$0: Can't read $1"
                      8:        exit 1
                      9: fi
                     10: /bin/echo -n "Subject: "
                     11: read title
                     12: /bin/echo -n "Newsgroups (general): "
                     13: read ng
                     14: if test x$ng = x ; then
                     15:        ng=general
                     16: fi
                     17: /bin/echo -n "Distribution ($ng): "
                     18: read dist
                     19: if test x$dist = x; then
                     20:        dist=$ng
                     21: fi
                     22: t=/tmp/pn$$
                     23: case $# in
                     24: 0)
                     25:        trap "sleep 1; cp $t $HOME/dead.article ; echo saved in $HOME/dead.article ; rm -f $t; exit" 1
                     26:        trap "" 2
                     27:        /bin/echo "Subject: $title" > $t
                     28:        /bin/echo "Newsgroups: $ng" >> $t
                     29:        if test $dist != $ng; then
                     30:                /bin/echo "Distribution: $dist" >> $t
                     31:        fi
                     32:        /bin/echo "" >> $t
                     33:        ${EDITOR-vi} $t
                     34:        cd /tmp
                     35:        if inews -h <$t
                     36:        then
                     37:                :
                     38:        else
                     39:                if cat $t >>$HOME/dead.article
                     40:                then
                     41:                        /bin/echo Article saved in $HOME/dead.article
                     42:                fi
                     43:        fi
                     44:        ;;
                     45: 1)
                     46:        cp $1 $t
                     47:        cd /tmp
                     48:        inews -t "$title" -n $ng < $t
                     49:        ;;
                     50: esac
                     51: sleep 1
                     52: rm -f $t

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.