Trying out AWK in Java with Perlito5
I’ve got this example “awk” script:
$ cat x.awk
BEGIN { print "Month Crates"
print "----- ------" }
{ print $1, " ", $2 }
we can convert AWK to Perl with “a2p”:
$ a2p x.awk > x.pl
now create a test input file:
$ cat > x.txt
a b
d e
1 2
and try it out in Perl5-Java:
$ java -jar perlito5.jar x.pl x.txt
Month Crates
----- ------
a b
d e
1 2
yay!
Leave a comment