Access command line parameters for a script

You can access command line parameters for a Groovy script by accessing the this.args array.

for (arg in this.args) {
    println arg
}

You can also refer to this variable as just args

for (arg in args) {
    println arg
}
You can leave a response, or trackback from your own site.

Leave a Reply