Jawk is a pure Java implementation of AWK. You can run it as a CLI, embed it directly in Java applications, compile scripts to reusable tuples, evaluate AWK expressions, feed it structured input, load extensions explicitly, and enable a sandboxed runtime when you need tighter execution constraints.
echo "hello world" | java -jar jawk-${project.version}-standalone.jar '{ print $2 ", " $1 "!" }'Awk awk = new Awk();
String result = awk.run("{ print toupper($0) }", "hello world");When writing custom extensions, annotate associative array parameters with @JawkAssocArray and declare them as Map values rather than concrete map implementations.
- Overview: https://jawk.io/index.html
- CLI: https://jawk.io/cli.html
- Java: https://jawk.io/java.html
- Extensions: https://jawk.io/extensions.html
- Writing Extensions: https://jawk.io/extensions-writing.html
See CONTRIBUTING.md.