oawk or nawk

you can determine if you have oawk or nawk using the following in a BEGIN rule will do the trick.

        if (ARGC == 0)
                # old awk
        else
                # new awk