man awk says: -V Print the version number of awk to standard output and exit. But: $ awk -V awk: unknown option -V ignored awk: no program given Only the --version works but it doesn't appear in man page.
Maybe we can add "-V" support for awk as manpage already mentions it and the change seems trivial. Adding a patch.
Created attachment 215298 [details] Proposed patch for awk
I have opened https://reviews.freebsd.org/D25164 to clean up this and some other small issues with the man page instead as awk is contributed source and already has means to display version. -V seems to be OpenBSD specific and was added for compatibility (with previous implementation they had) long time ago. In any case, let's see what others think about this (review).
A commit references this bug: Author: yuripv Date: Sat Jun 13 09:16:07 UTC 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 Changes: head/usr.bin/awk/awk.1
(In reply to Akos Somfai from comment #1) I have decided to document -version instead, to skip changes to contributed source. Thanks for your submission though, please keep them coming!
Thank you for the report, review and commit. There seems to be another issue related to documentation of FS, described in bug 226112. Following another caught on -V/--version, reviewing the whole awk(1) manpage was also discussed (bug 230730).
(In reply to Yuri Pankov from comment #5) Sure, thanks.
*** Bug 241552 has been marked as a duplicate of this bug. ***
A commit references this bug: Author: yuripv Date: Tue Dec 8 08:20:30 UTC 2020 New revision: 368438 URL: https://svnweb.freebsd.org/changeset/base/368438 Log: MFC r362147: 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 Changes: _U stable/12/ stable/12/usr.bin/awk/awk.1