Bug 241552 - awk.1 man page incorrect about how to find awk's version
Summary: awk.1 man page incorrect about how to find awk's version
Status: New
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Jason Helfman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-28 20:39 UTC by Andras Farkas
Modified: 2020-06-13 13:01 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andras Farkas 2019-10-28 20:39:32 UTC
The man page for awk(1) says you can find the version with awk -V
Instead, it seems you find the version with awk --version and awk -V does not work.
I don't have gawk or any other awk installed from ports or packages, so I know this is a bug.

$ awk -V
awk: unknown option -V ignored

awk: no program given

$ awk --version
awk version 20121220 (FreeBSD)
$ uname -a
FreeBSD nyann.tanasinn.mochi 12.0-RELEASE-p10 FreeBSD 12.0-RELEASE-p10 GENERIC  amd64
$ freebsd-version -kru
12.0-RELEASE-p10
12.0-RELEASE-p10
12.0-RELEASE-p11
Comment 1 Andras Farkas 2019-10-28 21:08:27 UTC
-version also works along with --version, by the way
Comment 2 Jason Helfman freebsd_committer 2019-11-22 17:58:12 UTC
I'm looking into this.

awk -d

Will also work. Trying to evaluate the best approach and have pinged another developer that has worked with awk recently.
Comment 3 Samy Mahmoudi 2020-06-13 13:01:32 UTC
Hi all,

This is a duplicate of bug 230730.
Solved by another duplicate of bug 230730 (bug 247004):

Author: yuripv
Date: Sat Jun 13 09:16:07 2020
New Revision: 362147
URL: https://svnweb.freebsd.org/changeset/base/362147

Log:
  awk(1): use -version instead of -V

  -V is OpenBSD specific, use -version instead.

  While here, fix issue reported by mandoc lint and drop nonexistent
  script(7) reference.

  PR:           247004
  Reviewed by:  0mp, markj
  Differential Revision:        https://reviews.freebsd.org/D25164

Modified:
  head/usr.bin/awk/awk.1