[lug] FYI: Ubuntu awk no longer gawk-compatible
Jed S. Baer
blug at jbaer.cotse.net
Sat Feb 6 16:12:18 MST 2021
I just noticed this. Couldn't say when it happened, because I don't when
the last time was I used the gensub() function.
I suppose not many folks use awk these days, but I still do little ad-hoc
things with it. For batch file renames, gensub() has been handy. But I just
tried it, and got "function not defined". A look at the man page confirms
this, and that awk is mawk. mawk has a gsub function, but it returns the
number of substitutions, whereas gensub returns the modified string.
In case this matters to you, check what your /etc/alternatives/awk links
to, and install the gawk package if needed.
All operating systems suck, but Linux just sucks less
- Linus Torvalds
More information about the LUG