Annotation of researchv10no/cmd/netnews/src/postnews.usg, revision 1.1.1.1

1.1       root        1: : '@(#)postnews.usg    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 "Subject: " \\c
                     11: read title
                     12: /bin/echo "Newsgroups (general): " \\c
                     13: read ng
                     14: if test x$ng = x ; then
                     15:        ng=general
                     16: fi
                     17: /bin/echo "Distribution ($ng): " \\c
                     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 ; /bin/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:        ${EDITOR:-vi} $t
                     33:        cd /tmp
                     34:        if inews -h <$t
                     35:        then
                     36:                :
                     37:        else
                     38:                if cat $t >>$HOME/dead.article
                     39:                then
                     40:                        /bin/echo Article saved in $HOME/dead.article
                     41:                fi
                     42:        fi
                     43:        ;;
                     44: 1)
                     45:        cp $1 $t
                     46:        cd /tmp
                     47:        inews -t "$title" -n $ng < $t &
                     48:        ;;
                     49: esac
                     50: 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.