[Toybox] awk seen in the wild

Ed Maste emaste at freebsd.org
Fri Jul 8 18:01:36 PDT 2016


On 8 July 2016 at 16:36, enh <enh at google.com> wrote:
> https://github.com/android-ndk/ndk/issues/133#issuecomment-231318129
> is the first time in about a decade i've seen awk more complicated
> than "print $2" in the wild...
>
>   readelf -sW toolkit/library/libxul.so |grep FUNC |awk '$2 ~ /[048c]$/ {print}'
>
> ruins my genius plan to "implement" an awk that only supports "print
> $(\d+)"... :-)

Heh. If you want some contemporary "more complicated" samples there
are 85 awk scripts in the FreeBSD tree that should serve that purpose.

Here's a few interesting ones for your amusement:
https://svnweb.freebsd.org/base/head/sys/dev/bhnd/tools/nvram_map_gen.awk?view=markup
https://svnweb.freebsd.org/base/head/sys/tools/sound/feeder_rate_mkfilter.awk?view=markup
https://svnweb.freebsd.org/base/head/sys/tools/makeobjops.awk?view=markup
https://svnweb.freebsd.org/base/head/tools/tools/nanobsd/mtree-dedup.awk?view=markup




> _______________________________________________
> Toybox mailing list
> Toybox at lists.landley.net
> http://lists.landley.net/listinfo.cgi/toybox-landley.net


More information about the Toybox mailing list