Learn how to install AWK locally to solve Exercism's exercises on your own machine
The Exercism AWK track uses gawk
, GNU's AWK.
You may already have it; to check, execute this command
awk --version
If that returns:
something like GNU Awk 5.1.0 ...
something like awk version 20200816
nawk
, also known as BWK awk (after Brian Kernighan) or "one true awk".the error awk: not an option: --version
mawk
.awk -W version
which may return mawk 1.3.4 20200120
.the error awk: unrecognized option: version
followed by BusyBox v1.35.0 ...
a "command not found" error
Varies with your distro's package manager. Typically:
apt install gawk
yum install gawk
apk add gawk
# and so on
You may need to use sudo
to execute the appropriate command.
Homebrew is your friend. Follow the link to install it and then run:
brew install gawk
For WSL, see instructions for Linux above.
For cygwin, install the gawk
package.
For the brave, instructions available in the gawk
manual.
Places to look for help for AWK questions:
awk
tag.awk
tag into page.irc://irc.liberachat.net/#awk
, irc://irc.liberachat.net/#exercism