linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] find_repeated_words.sh: Do not process files that are redirects.
@ 2015-03-15  0:15 Stéphane Aulery
       [not found] ` <1426378524-31758-1-git-send-email-saulery-GANU6spQydw@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Stéphane Aulery @ 2015-03-15  0:15 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w
  Cc: Stéphane Aulery, linux-man-u79uwXL29TY76Z2rM5mHXA

Signed-off-by: Stéphane Aulery <saulery-GANU6spQydw@public.gmane.org>
---
 scripts/find_repeated_words.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/find_repeated_words.sh b/scripts/find_repeated_words.sh
index 50133be..747872e 100644
--- a/scripts/find_repeated_words.sh
+++ b/scripts/find_repeated_words.sh
@@ -25,6 +25,9 @@
 #
 
 for file in "$@" ; do 
+   # Do not process files that are redirects.
+   grep -qE "^\.so man.*" "$file"
+   if test $? -ne 0; then
     words=$(MANWIDTH=2000 man -l "$file" 2> /dev/null | col -b | \
 	tr ' \008' '\012' | sed -e '/^$/d' | \
 	sed 's/ *$//' | 
@@ -33,4 +36,5 @@ for file in "$@" ; do
     if test -n "$words"; then
         echo "$file: $words"
     fi
+   fi
 done
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-22 15:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-15  0:15 [PATCH] find_repeated_words.sh: Do not process files that are redirects Stéphane Aulery
     [not found] ` <1426378524-31758-1-git-send-email-saulery-GANU6spQydw@public.gmane.org>
2015-03-22 15:39   ` Michael Kerrisk (man-pages)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).