Skip to content

MetricsHub/jawk

Repository files navigation

Jawk

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

Jawk is a pure Java implementation of AWK. It executes the specified AWK scripts to parse and process text input, and generate a text output. Jawk can be used as a CLI, but more importantly it can be invoked from within your Java project.

This project is forked from the excellent Jawk project that was maintained by hoijui on GitHub.

Jawk does not rely on any logging framework; errors are reported through standard Java exceptions.

Project Documentation

Run Jawk CLI

See Jawk CLI documentation for command-line options, including -K <filename> to compile a script to a tuples file and -l <filename> to load previously compiled tuples.

Run AWK inside Java

Execute a script in just one line using the convenience methods on Awk:

Awk awk = new Awk();
String result = awk.run("{ print toupper($0) }", "hello world");

See AWK in Java documentation for more details and advanced usage.

Contributing

See CONTRIBUTING.md.