The mawk utility is not currently in the cygwin repository. However, it is available from a third party repository:
http://artfiles.org/cygwin.org/pub/cygwinports/release-2/mawk/
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:
wget http://artfiles.org/cygwin.org/pub/cygwinports/release-2/mawk/mawk-1.3.4.20100625-1.tar.bz2
- Unpack the precompiled package:
tar xjf mawk-1.3.4.20100625-1.tar.bz2
- 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