Improve compatibility

Use `/usr/bin/env gawk` instead of `/usr/bin/awk` to improve compatibility with systems on which `gawk` may not be placed at `/usr/bin`, and report more accurate error information rather than syntax error or illegal statement error when GNU awk is not installed.