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
-version also works along with --version, by the way
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.
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
Samy Mahmoudi, thanks for the comment about the duplicate. *** This bug has been marked as a duplicate of bug 247004 ***
(In reply to Gordon Bergling from comment #4) You are welcome Gordon.