Thread (1 message) 1 message, 1 author, 2015-03-22

Re: [PATCH] find_repeated_words.sh: Do not process files that are redirects.

From: Michael Kerrisk (man-pages) <hidden>
Date: 2015-03-22 15:39:12

On 03/15/2015 01:15 AM, Stéphane Aulery wrote:
Signed-off-by: Stéphane Aulery <redacted>
Thanks, Stéphane. Patch applied.

Cheers,

Michael

quoted hunk
---
 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

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help