When printing multiple files using
lpr and the
-p option, the name of the first file is printed in the header for all files. How can this behavior be modified such that the correct file name is printed in the header for each file?
As an example, one could print three files "file1.txt", "file2.txt", and "file3.txt" by either of the following commands:
lpr -p file1.txt file2.txt file3.txt lpr -p file*.txt
In both cases, however, "file1.txt" is printed in the header line of each file. I would like "file2.txt" to be printed in the header for file2, and so forth (without having to print each file separately a la
lpr -p file1.txt; lpr -p file2.txt; lpr -p file3.txt).