It's not a secret anymore!
The moose likes Other Languages and the fly likes Sample AWK Scripts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Other Languages
Bookmark "Sample AWK Scripts" Watch "Sample AWK Scripts" New topic

Sample AWK Scripts

R Keane

Joined: Jan 22, 2011
Posts: 5
hey guys

I am currently attempting to write an AWK interpreter in Java. I think I have a lot of it working, but I have reached the point where the things I test all run as intended. That being said, I am not very creative with my AWK scripts,and I suspect that longer or in-depth scripts might cause problems. Does anyone happen to have some longer script they could share with me, for me to test? Ideally, with a sample input I can use to test as well.

Also, I do know about the JAWK project. My boss at work originally asked me to create this, and it has become a very interesting project so I want to continue it in my free time.

Thanks for the help,
R. Keane
Anand Hariharan

Joined: Aug 22, 2006
Posts: 272

The gawk implementation bundles several test scripts in its downloadable archive:

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- Antoine de Saint-Exupery
I agree. Here's the link:
subject: Sample AWK Scripts
jQuery in Action, 3rd edition