From: Alejandro Colomar <alx.manpages@gmail.com>
To: linux-man@vger.kernel.org
Cc: mtk.manpages@gmail.com, Violeta Kabadzhova <vkabadzhova@gmail.com>
Subject: Re: Repeated ERRORS (was: A typo report in socket(2))
Date: Wed, 31 Aug 2022 14:05:45 +0200 [thread overview]
Message-ID: <9d97bb84-28a7-930d-8186-babd93d431d7@gmail.com> (raw)
In-Reply-To: <7cf06ed9-3f25-bd17-dfbf-1488cd53f229@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1991 bytes --]
On 8/31/22 14:01, Alejandro Colomar wrote:
> man_section()
> {
> if [ $# -lt 2 ]; then
> >&2 echo "Usage: ${FUNCNAME[0]} <dir> <section>...";
> return $EX_USAGE;
> fi
>
> local page="$1";
> shift;
> local sect="$*";
>
> find "$page" -type f \
> |xargs wc -l \
> |grep -v -e '\b1 ' -e '\btotal\b' \
> |awk '{ print $2 }' \
> |sort \
> |while read -r manpage; do
> (sed -n '/^\.TH/,/^\.SH/{/^\.SH/!p}' <"$manpage";
> for s in $sect; do
> <"$manpage" \
> sed -n \
> -e "/^\.SH $s/p" \
> -e "/^\.SH $s/,/^\.SH/{/^\.SH/!p}";
> done;) \
> |man -P cat -l - 2>/dev/null;
> done;
> }
>
>
> And the list is:
And the list for man3 is a bit shorter:
$ man_section man3 ERRORS | grep -e '^\w*(3)' -e '^ E' | grep -o
'^ *[^ ]*' | sed '/^\w/p' | uniq -d | tac | sed -n '/^ /,/^[^ ]/p' | tac
| tee /dev/tty | wc -l
FPATHCONF(3)
EINVAL
FUTIMES(3)
ENOSYS
GETCWD(3)
EINVAL
GETENTROPY(3)
EIO
KILLPG(3)
ESRCH
LIO_LISTIO(3)
EAGAIN
MKFIFO(3)
ENOTDIR
MQ_OPEN(3)
EACCES
EINVAL
ENOENT
NEWLOCALE(3)
EINVAL
POSIX_MADVISE(3)
EINVAL
PTHREAD_ATTR_SETAFFINITY_NP(3)
EINVAL
PTHREAD_CREATE(3)
EAGAIN
PTHREAD_JOIN(3)
EINVAL
PTHREAD_SETAFFINITY_NP(3)
EINVAL
PTHREAD_SETCANCELSTATE(3)
EINVAL
PTHREAD_SETNAME_NP(3)
ERANGE
RANDOM(3)
EINVAL
RANDOM_R(3)
EINVAL
SCANDIR(3)
ENOTDIR
SEM_OPEN(3)
EINVAL
SEM_WAIT(3)
EINVAL
SHM_OPEN(3)
EACCES
ENOENT
47
--
Alejandro Colomar
<http://www.alejandro-colomar.es/>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2022-08-31 12:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAFxh5QD20xDA0DXYOw9EyWAzN4PCxy8SPEN4zx=rfCieYFgA4w@mail.gmail.com>
2022-08-31 12:01 ` Repeated ERRORS (was: A typo report in socket(2)) Alejandro Colomar
2022-08-31 12:05 ` Alejandro Colomar [this message]
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=9d97bb84-28a7-930d-8186-babd93d431d7@gmail.com \
--to=alx.manpages@gmail.com \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=vkabadzhova@gmail.com \
/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