From: Randy Dunlap <rdunlap@xenotime.net>
To: lkml <linux-kernel@vger.kernel.org>
Cc: Cyril Brulebois <kibi@debian.org>, trivial@kernel.org
Subject: Re: [PATCH 3/4] Documentation/00-INDEX.sh: add script to help keeping the index up-to-date
Date: Tue, 26 Apr 2011 16:20:07 -0700 [thread overview]
Message-ID: <20110426162007.13929384.rdunlap@xenotime.net> (raw)
In-Reply-To: <20110424115811.e96c121f.rdunlap@xenotime.net>
On Sun, 24 Apr 2011 11:58:11 -0700 Randy Dunlap wrote:
> On Sat, 23 Apr 2011 23:05:37 +0200 Cyril Brulebois wrote:
>
> > Randy Dunlap <rdunlap@xenotime.net> (23/04/2011):
> > > The "undocumented" list looks correct (well, it could omit .orig
> > > files), but the "Documented but missing" list contains words, e.g.:
> > > […]
> >
> > One coffee later… Looks like your grep is behaving as if "grep -F" was
> > passed; that might be better with an explicit "grep -G" (which is the
> > default), see patch below?
>
> Sorry, this patch didn't help (did not change the output).
>
> > diff --git a/Documentation/00-INDEX.sh b/Documentation/00-INDEX.sh
> > index 31d92d2..f22c260 100755
> > --- a/Documentation/00-INDEX.sh
> > +++ b/Documentation/00-INDEX.sh
> > @@ -4,7 +4,7 @@
> > # Try and keep the 00-INDEX file up-to-date.
> >
> > # List all entries below the 00-INDEX entry:
> > -documented=$(sed '1,/^00-INDEX$/d' 00-INDEX|grep -v '^\s'|sed 's,/$,,')
> > +documented=$(sed '1,/^00-INDEX$/d' 00-INDEX|grep -G -v '^\s'|sed 's,/$,,')
> >
> > # List all files/directories except 00-INDEX* and Makefile:
> > present=$(ls -1|grep -v '^00-INDEX'|grep -v '^Makefile$')
> >
> >
> > Maybe some grep alias in your environment? I couldn't reproduce the
> > behaviour you mentioned even using (unpack+PATH+LD_LIBRARY_PATH)
> > pcre-7.8-2.fc11.ppc.rpm and sed-4.2.1-1.fc11.ppc.rpm, until I tried
> > various options like passing -F to grep.
>
> I couldn't find any grep alias, but I changed "grep" in 00-INDEX.sh to "/bin/grep"
> anyway, and still got the same results.
ad I don't see any environment variables that would affect grep either.
Anyway, using this line instead of any one of the lines above works for me:
documented=$(sed '1,/^00-INDEX$/d' 00-INDEX|grep -G -v ^[[:space:]]|sed 's:/$::')
i.e., use ^[[:space:]] instead of the (original) '^\s'.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
next prev parent reply other threads:[~2011-04-26 23:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-23 16:15 [PATCH 1/4] Documentation/00-INDEX: fix typo Cyril Brulebois
2011-04-23 16:15 ` [PATCH 2/4] Documentation/00-INDEX: improve description for sh/ Cyril Brulebois
2011-04-26 22:42 ` Randy Dunlap
2011-04-23 16:15 ` [PATCH 3/4] Documentation/00-INDEX.sh: add script to help keeping the index up-to-date Cyril Brulebois
2011-04-23 16:33 ` Randy Dunlap
2011-04-23 17:15 ` Cyril Brulebois
2011-04-23 18:33 ` Randy Dunlap
2011-04-23 21:05 ` Cyril Brulebois
2011-04-24 18:58 ` Randy Dunlap
2011-04-26 23:20 ` Randy Dunlap [this message]
2011-04-28 12:41 ` Cyril Brulebois
2011-04-28 12:44 ` [PATCH 3/4 v2] " Cyril Brulebois
2011-04-23 16:15 ` [PATCH 4/4] Documentation/00-INDEX: update with new top-level files Cyril Brulebois
2011-04-26 22:44 ` Randy Dunlap
2011-04-26 22:42 ` [PATCH 1/4] Documentation/00-INDEX: fix typo Randy Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110426162007.13929384.rdunlap@xenotime.net \
--to=rdunlap@xenotime.net \
--cc=kibi@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=trivial@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®