🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #80077

Re: docheckgroups -u throws error regrding egrep

#80077
From: Julien ÉLIE
Date: Sun, 01 Feb 2009 20:23
94 lines
3672 bytes
Hi Michael,

>> No error without the "-u" flag?
>
> Yes, no error. I'll get the very same output you get including "-u'.
> But, if I understand http://www.eyrie.org/~eagle/software/inn/docs/docheckgroups.html
> understand correctly,'-u' shouldn't output what to do, but applies it
> instead. Correct or misunderstanding of mine?

What makes you think of that in the man page?

In the examples section:

    Now that we have checked the output of docheckgroups and that we agree with
    the changes, we run it with the -u flag to update the newsgroups file and we
    redirect the standard output to mod-active to update the active file:

        cat test | docheckgroups -u | mod-active


docheckgroups -u still outputs the newsgroups to create/remove, obsolete descriptions, etc.
The only thing which changes is that:

# The following newsgroups descriptions are missing and should be added:
#
#       [...]
#
# You can remove them by editing /home/news/db/newsgroups
# or by using the -u flag with docheckgroups.

becomes:

# The following newsgroups descriptions are obsolete:
#
#       [...]
#
# The file /home/news/db/newsgroups has just been updated accordingly.

and will not be output the next time you run docheckgroups.




> Yes, I know. But 'docheckgroup -u' dies before piping to mod-active.
> Therefore I concentrated on that command.
>
> #v+
> news|news> egrep --help
> Usage: egrep [OPTION]... PATTERN [FILE] ...

Hmm...  The problem does not seem to be related with egrep, but with
the way "-u" is parsed.  It is not removed by docheckgroups.  Then,
we have "egrep -u" which does not exist.

docheckgroups currently does:

##  Parse arguments.
if [ $# -gt 0 ]; then
    case $1 in
    -u) shift;
        UPDATEDESC=true;;
    esac
fi


Do you know how it should be written for your platform?

##  Parse arguments.
if [ $# -gt 0 ]; then
    case $1 in
    -u)
        shift
        UPDATEDESC=true
        ;;
    esac
fi


??


[ "$#" -gt "0" ]

??

Could you please make some tests?
It is near the beginning of <pathbin>/docheckgroups.

-- 
Julien ÉLIE

« Il y a deux sortes de justice : vous avez l'avocat qui connaît bien la loi,
  et l'avocat qui connaît bien le juge ! » (Coluche) 
Technical Details
Message-ID: <gm50bp$7tc$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!news.mixmin.net!news2.arglkargh.de!news.ecp.fr!news.trigofacile.com!not-for-mail
References: <gm4h6m$9r3$1@de-l.enfer-du-nord.net> <gm4njb$uj2$1@news.trigofacile.com> <gm4u70$le6$1@de-l.enfer-du-nord.net>

Show Full Headers
Complete Article Headers
Message-ID: <gm50bp$7tc$1@news.trigofacile.com>
Subject: Re: docheckgroups -u throws error regrding egrep
Date: Sun, 1 Feb 2009 21:23:20 +0100
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <gm4h6m$9r3$1@de-l.enfer-du-nord.net> <gm4njb$uj2$1@news.trigofacile.com> <gm4u70$le6$1@de-l.enfer-du-nord.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!news.mixmin.net!news2.arglkargh.de!news.ecp.fr!news.trigofacile.com!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Lines: 94
NNTP-Posting-Host: aaubervilliers-151-1-42-108.w83-112.abo.wanadoo.fr
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
 reply-type=original
Content-Transfer-Encoding: 8bit
X-Trace: news.trigofacile.com 1233519801 8108 83.112.25.108 (1 Feb 2009
X-Complaints-To: abuse@trigofacile.com
NNTP-Posting-Date: Sun, 1 Feb 2009 20:23:21 +0000 (UTC)
In-Reply-To: <gm4u70$le6$1@de-l.enfer-du-nord.net>
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049