Cygwin Wiki

The mawk utility is not currently in the cygwin repository. However, it is available from a third party repository:

Replacing gawk with mawk[]

It is not possible to remove gawk using apt-cyg:

apt-cyg remove gawk
apt-cyg cannot remove package gawk, exiting

To replace gawk with awk:

  • Download the precompiled mawk package:
  • Unpack the precompiled package:
tar xjf mawk-
  • Install the mawk interpreter:
cp usr/bin/mawk.exe /usr/bin/mawk.exe
  • Update the awk symlink:
cd /usr/bin
rm awk.exe
ln -s mawk.exe awk.exe
  • Delete the gawk executable
rm /usr/bin/gawk.exe