Skip to content

jawkio/jawk

Repository files navigation

Jawk

GitHub release (with filter) Build Reproducible GitHub top language License

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.

CLI Example

echo "hello world" | java -jar jawk-${project.version}-standalone.jar '{ print $2 ", " $1 "!" }'

Java Example

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.

Documentation

Contributing

See CONTRIBUTING.md.