I needed this for a project, it turned out to be non-trivial, now it lives on GitHub.
You can include wildmatch
by prepending -f wildcard.awk
to your awk
call,
but in most cases, you’ll want to copy the function into your awk
program.
awk -f wildcard.awk -f test.awk tests.txt