]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
src/bin/mansectf, man/man1/mansectf.1: Add program and manual page
authorAlejandro Colomar <alx@kernel.org>
Wed, 28 Jan 2026 18:50:38 +0000 (19:50 +0100)
committerAlejandro Colomar <alx@kernel.org>
Fri, 30 Jan 2026 14:47:05 +0000 (15:47 +0100)
Reported-by: Seth McDonald <sethmcmail@pm.me>
Cc: Douglas McIlroy <douglas.mcilroy@dartmouth.edu>
Cc: "G. Branden Robinson" <branden@debian.org>
Cc: наб <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man1/mansectf.1 [new file with mode: 0644]
src/bin/mansectf [new file with mode: 0755]

diff --git a/man/man1/mansectf.1 b/man/man1/mansectf.1
new file mode 100644 (file)
index 0000000..962731e
--- /dev/null
@@ -0,0 +1,56 @@
+.\" Copyright, the authors of the Linux man-pages project
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.TH mansectf 1 (date) "Linux man-pages (unreleased)"
+.SH NAME
+mansectf
+\-
+format specific sections of manual pages
+.SH SYNOPSIS
+.SY mansectf
+.I section
+.RI [ file \~.\|.\|.]
+.YS
+.SH DESCRIPTION
+The
+.B mansectf
+command formats specific sections of manual-page files.
+.SH PARAMETERS
+See
+.BR mansect (1).
+.SH ENVIRONMENT
+See
+.BR man (1).
+.SH EXAMPLES
+.EX
+.RB $\~ "man \-w strtol strtoul | xargs mansectf \[aq]NAME|SEE ALSO\[aq] | cat";
+strtol(3)           Library Functions Manual          strtol(3)
+\&
+NAME
+     strtol, strtoll, strtoq - convert a string to a long inte‐
+     ger
+\&
+SEE ALSO
+     atof(3),  atoi(3),  atol(3), strtod(3), strtoimax(3), str‐
+     toul(3)
+\&
+Linux man‐pages 6.16       2025‐12‐01                 strtol(3)
+---------------------------------------------------------------
+strtoul(3)          Library Functions Manual         strtoul(3)
+\&
+NAME
+     strtoul, strtoull, strtouq - convert a string  to  an  un‐
+     signed long integer
+\&
+SEE ALSO
+     a64l(3),  atof(3), atoi(3), atol(3), strtod(3), strtol(3),
+     strtoumax(3)
+\&
+Linux man‐pages 6.16       2025‐09‐21                strtoul(3)
+.EE
+.SH SEE ALSO
+.BR lexgrog (1),
+.BR groff (1),
+.BR pcre2grep (1),
+.BR mandb (8)
diff --git a/src/bin/mansectf b/src/bin/mansectf
new file mode 100755 (executable)
index 0000000..a80f90b
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+#
+# Copyright, the authors of the Linux man-pages project
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+set -Eefuo pipefail;
+
+mansect "$@" \
+| man /dev/stdin;