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

<lang awk>$ java -jar jawk.1_02.jar 'BEGIN { print "Hello from JVM" }'</lang>

Caveat[edit]

The space after -F is not optional.

<lang awk>$ java -jar jawk.jar -F: '{ print $1 }' # FAILS!! $ java -jar jawk.jar -F : '{ print $1 }' # ok</lang>