aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xusr.bin/man/man.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh
index af638527f497..24a0464689cc 100755
--- a/usr.bin/man/man.sh
+++ b/usr.bin/man/man.sh
@@ -322,7 +322,7 @@ man_check_for_so() {
# We need to loop to accommodate multiple .so directives.
while true
do
- line=$($cattool "$manpage" 2>/dev/null | head -n1)
+ line=$($cattool "$manpage" 2>/dev/null | grep -E -m1 -v '^\.\\"[ ]*|^[ ]*$')
case "$line" in
.so*) trim "${line#.so}"
decho "$manpage includes $tstr"