groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: All caps .TH page title


From: Ralph Corderoy
Subject: Re: All caps .TH page title
Date: Sat, 23 Jul 2022 11:36:51 +0100

Hi Alejandro,

Wandering off-topic...

> $ find man* -type f \
>    | tr '[:upper:]' '[:lower:]' \
>    | sort \
>    | uniq -d \
>    | while read f; do
>       find man* -type f \
>       | grep -i $f;
>    done;
> man2/_Exit.2
> man2/_exit.2
> man3/nan.3
> man3/NAN.3

You may like to know GNU's uniq(1) has ‘-D’ to print all duplicates
and ‘-i’ to ignore case.

    $ find -type f | sort -f | uniq -Di
    ./man2/_exit.2
    ./man2/_Exit.2
    ./man3/nan.3
    ./man3/NAN.3
    ./man3/sd_bus_error_map.3
    ./man3/SD_BUS_ERROR_MAP.3
    ./man8/pam.8
    ./man8/PAM.8
    $

> $ find man* -type f \
>    | tr '[:upper:]' '[:lower:]' \
>    | sort \
>    | uniq -d \
>    | while read f; do
>       find man* -type f \
>       | grep -i $f;
>    done \
>    | while read f; do
>       echo ===$f===;
>       head -n1 $f;
>    done;

GNU's grep(1) has ‘-m’ for the maximum number of matches.

    $ grep -m1 ^ `find -type f | sort -f | uniq -Di`
    ./man2/_exit.2:.\" This manpage is Copyright (C) 1992 Drew Eckhardt;
    ./man2/_Exit.2:.so man2/_exit.2
    ./man3/nan.3:.\" Copyright 2002 Walter Harms 
(walter.harms@informatik.uni-oldenburg.de)
    ./man3/NAN.3:.so man3/INFINITY.3
    ./man3/sd_bus_error_map.3:.so sd_bus_error_add_map.3
    ./man3/SD_BUS_ERROR_MAP.3:.so sd_bus_error_add_map.3
    ./man8/pam.8:.so PAM.8
    ./man8/PAM.8:'\" t
    $

-- 
Cheers, Ralph.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]