getconf.1: Note that leading underscores in configuration

variable names are ignored by getconf(1).

While here, add a section with examples, and make the synopsis
more concise.

PR bin/57875
This commit is contained in:
jkoshy 2024-02-18 19:35:38 +00:00
parent 855b7dce54
commit cdd0abcf1b
1 changed files with 23 additions and 6 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: getconf.1,v 1.13 2014/04/13 01:45:34 snj Exp $
.\" $NetBSD: getconf.1,v 1.14 2024/02/18 19:35:38 jkoshy Exp $
.\"
.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd August 9, 2011
.Dd February 18, 2024
.Dt GETCONF 1
.Os
.Sh NAME
@ -37,13 +37,10 @@
.Nm
.Ar system_var
.Nm
.Fl a
.Nm
.Ar path_var
.Ar pathname
.Nm
.Fl a
.Ar pathname
.Fl a Op Ar pathname
.Sh DESCRIPTION
The
.Nm
@ -80,8 +77,28 @@ standard output, in the format
=
.Va value
.Dc .
.Pp
For compatibility with other operating systems,
.Nm
will ignore leading underscores in the names specified in the
.Ar system_var
and
.Ar path_var
arguments.
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
To retrieve the number of configured processors, use:
.Bd -literal -offset indent
$ getconf NPROCESSORS_CONF
.Ed
.Pp
To retrieve the maximum number of bytes (excluding the trailing
.Dv NUL )
for a filename in the current directory, use:
.Bd -literal -offset indent
$ getconf NAME_MAX .
.Ed
.Sh SEE ALSO
.Xr pathconf 2 ,
.Xr confstr 3 ,