Jawk

From Rosetta Code
Jawk is an implementation of AWK. Other implementations of AWK.

Jawk runs an Awk program inside the Java Virtual Machine.

Quick start[edit]

Go to http://sourceforge.net/projects/jawk/ and download the latest jar. Then run a command like

$ java -jar jawk.1_02.jar 'BEGIN { print "Hello from JVM" }'

Caveat[edit]

The space after -F is not optional.

$ java -jar jawk.jar -F: '{ print $1 }'   # FAILS!!
$ java -jar jawk.jar -F : '{ print $1 }' # ok