File:  [Research Unix] / researchv10no / cmd / netnews / config / postnews.v7
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:35 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

: '@(#)postnews.v7	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 -n "Subject: "
read title
echo -n "Newsgroups (general): "
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
	echo "" >> $t
	${EDITOR-vi} $t
	if inews -h <$t
	then
		:
	else
		if cat $t >>$HOME/dead.article
		then
			echo Article saved in $HOME/dead.article
		fi
	fi
	;;
1)
	inews -t "$title" -n $ng < $1
	;;
esac
sleep 1
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.