IIRC (no Ubuntu VM handy right now) mawk is the default with a minimal LTS install, using alternatives to point awk at it. When you apt install gawk it has a higher priority in alternatives and flips the awk symlinks over to gawk automagically.
Re:Coreutils Gotchas (2015)
by version_five on Friday June 18, 2021 @01:59PM
(#27553033)
> gawk it has a higher priority in alternatives and flips the awk symlinks over to gawk automagically
That must be what happened. I just checked my other machine that had a pretty new install of 20.04 on it, and it does have mawk. I'm happy to see I'm not crazy.
Ah...yeah, I was probably over generalizing when I said that, though it's probably fair to say that gawk is the default awk for many popular Linux distros.
Debian & Ubuntu have moved back and forth between using mawk or gawk several times.
Debian Jessie (circa 2016) used gawk.
Debian Stretch (circa 2017) used mawk.
Today, Debian uses gawk.
Have you flipped the final one? Both my Buster and Bullseye installation only have mawk.
Trying to dig in deeper makes my head explode though. mawk is marked required yet with update-alternatives priority of 5, and gawk is marked optional but with a priority 10. I guess the intention is that mawk is good enough for base installs, but you probably want gawk.
Edit: just checked and my vps than runs 20.10 uses gawk
Edit 2: 18.04 also comes with gawk, at least the install I have. I know I have worked with mawk on a linux machine- could it have been Ubuntu 16.04?