case $# in 0) ng=h while $test "$ng" = h ; do $echo "" $echo $n "Newsgroup(s): $c" read ng case $ng in h) $cat <<'EOH' Type the name of one or more newsgroups to which you wish to post an article. If you want to post to multiple newsgroups, it is better to do them all at once than to post to each newsgroup individually, which defeats the news reading programs' strategies of eliminating duplicates. Separate multiple newsgroup names with commas. EOH ;; esac done ;; *) ng=$1 shift ;; esac case $ng in *\ *) ng=`$echo "$ng" | $sed 's/[, ] */,/g'` ;; esac case $ng in net.*|mod.*|comp.*|news.*|sci.*|rec.*|misc.*|soc.*|talk.*) defdist=world dist=h ;; *.*) defdist=`expr "X$ng" : 'X\([a-z0-9]*\)'` dist=h ;; *) defdist='' dist='' ;; esac while $test "$dist" = h ; do if $test -f $lib/distributions; then $echo " " $echo "Your local distribution prefixes are:" $cat $lib/distributions $echo " " else $egrep -v '[ ]none$' <$tmpart && \ $test -s $tmpart; then : null else $echo "Unrecognized distribution prefix--type h for help, CR to use anyway." defdist=$dist dist=h fi ;; esac done case $ng in *net.general*) follow=`echo "$ng" | sed 's/net\.general/net.followup/g'` ;; *) follow="" ;; esac case $# in 0) title=h while $test "$title" = h ; do $echo "" $echo $n "Title/Subject: $c" read title case $title in h) $cat <<'EOH' Type the title for your article. Please make it as informative as possible (within reason) so that people who aren't interested won't have to read the article to find out they aren't interested. This includes marking movie spoilers as (spoiler), and rotated jokes as (rot 13). EOH ;; esac done ;; *) title="$*" ;; esac # now build a file with a header for them to edit set X ${USER-${LOGNAME-`who am i`}} shift logname=$1 case $logname in *!*) logname=`expr "$logname" : '!\(.*\)$'` ;; esac case ${NAME-$nametype} in bsd) fullname=`$sed $tmpart <