Next | Trivial Utilities | 78 |
ordinary grep produces many different kinds of output
With one input file:
matching line another matching line
With multiple input files:
filename1: matching line another file: another matching line
With -l:
filename1 another file
With -q (or was it -s?):
The printing logic would have been quite complicated
Except I used a trick:
printf $format, $file, $_, $.;
What is in $format?
Next | Menu | Copyright © 2012 M. J. Dominus |