[lug] FYI: Ubuntu awk no longer gawk-compatible

Davide Del Vento davide.del.vento at gmail.com
Sat Feb 6 20:05:59 MST 2021

Thanks, that is good to know!

On the Ubuntu box I use, it's still gawk:

davide at buzzicone:/tmp$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

davide at buzzicone:/tmp$ awk --version
GNU Awk 4.1.4, API: 1.1 (GNU MPFR 4.0.1, GNU MP 6.1.2)
Copyright (C) 1989, 1991-2016 Free Software Foundation.

On Sat, Feb 6, 2021 at 4:12 PM Jed S. Baer <blug at jbaer.cotse.net> wrote:

> 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
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20210206/eb20f20c/attachment.html>

More information about the LUG mailing list