Most programs need to interact with the filesystem and the network to obtain data and to produce a result. Input/output routines and classes, or I/O for short, group that functionality. In this chapter we include several recipes that will help you work with files of different kinds in different ways.
Recipe 2-1. Read Files Handled as Arguments
Problem
You need to process a series of files, but you don’t know in advance which files you are going to work with, so it’s better if the script works with the files you provide as arguments.
Solution
The dynamic variable $*ARGFILES is an alias to a pseudo-file that includes ...