[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to check the version of awk?
From: |
Bob Proulx |
Subject: |
Re: How to check the version of awk? |
Date: |
Fri, 30 Apr 2010 13:02:13 -0600 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Peng Yu wrote:
> Eric Blake wrote:
> > Peng Yu wrote:
> >> -v --version and --help are not working with the awk installed on my
> >> machine. How to figure out which version it is?
> >
> > What's your machine? It's probably the vendor awk and not GNU awk.
>
> ubuntu
I suspect you are using 'mawk' then. When you type 'man awk' do you
get the 'mawk' man page?
On my Debian machine, which will be similar to but different from your
Ubuntu machine:
$ type awk
awk is hashed (/usr/bin/awk)
$ update-alternatives --list awk
/usr/bin/mawk
/usr/bin/gawk
$ update-alternatives --display awk
awk - status is auto.
link currently points to /usr/bin/gawk
/usr/bin/mawk - priority 5
slave nawk: /usr/bin/mawk
slave nawk.1.gz: /usr/share/man/man1/mawk.1.gz
slave awk.1.gz: /usr/share/man/man1/mawk.1.gz
/usr/bin/gawk - priority 10
slave nawk: /usr/bin/gawk
slave nawk.1.gz: /usr/share/man/man1/gawk.1.gz
slave awk.1.gz: /usr/share/man/man1/gawk.1.gz
Current `best' version is /usr/bin/gawk.
Very likely you have mawk installed but do not have gawk installed.
You can solve this by installing gawk.
$ sudo apt-get install gawk
Bob