Bug 242191 - man pages: sysctl -n option incorrectly described
Summary: man pages: sysctl -n option incorrectly described
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-24 14:54 UTC by Stilez
Modified: 2020-08-22 12:00 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stilez 2019-11-24 14:54:35 UTC
Current misleading description, suggests it outputs value of sysctls only, whereas it can output anything (type/descript etc). Its actual function is to suppress name, not output value only.

Current misleading description:

"-n:  Show only variable values, not their names.  This option is useful for setting shell variables.  For instance, to save the pagesize in variable psize, use:

 set psize=`sysctl -n hw.pagesize"


Suggested improved wording:

-n:  Suppress variable names. The output will be the bare value, description, type, or other details, according to the other options used. This option is useful for setting shell variables.  For instance, to save the pagesize in variable psize, use:

 set psize=`sysctl -n hw.pagesize"


Sorry, not up to speed on SVN, hence unconfident to push as a change myself.
Comment 1 Fernando Apesteguía freebsd_committer 2020-08-21 18:16:59 UTC
review D26149
Comment 2 Fernando Apesteguía freebsd_committer 2020-08-22 11:58:18 UTC
review D26149
Comment 3 commit-hook freebsd_committer 2020-08-22 12:00:12 UTC
A commit references this bug:

Author: fernape
Date: Sat Aug 22 11:59:14 UTC 2020
New revision: 364481
URL: https://svnweb.freebsd.org/changeset/base/364481

Log:
  sysctl(8): clarify -n flag

  -n omits the name of the variable regardless of the type of information that is
  requested. Rephrase to clarify this point.

  PR:	242191
  Submitted by:	stilezy@gmail.com
  Approved by:	emaste@
  Differential Revision:	https://reviews.freebsd.org/D26149

Changes:
  head/sbin/sysctl/sysctl.8
Comment 4 Fernando Apesteguía freebsd_committer 2020-08-22 12:00:31 UTC
Committed,

Thanks!