O'Reilly logo

Groovy Programming by John Savage, Kenneth Barclay

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 10 FILES

The programs that we have studied have all produced some output and, in many cases, accepted some input. This has been achieved through using the standard input (keyboard) and standard output (screen). However, these simple programs are unrepresentative of many computer applications. In practice, most applications involve the permanent storage of data in a computer file. In this chapter, we consider applications that process files.

10.1 COMMAND LINE ARGUMENTS

A Groovy program exists in an environment established by the operating system. The environment supports passing command line arguments to a program when it begins execution. In a Groovy script, such as that in Example 01, these arguments can be accessed by the args variable, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required