Tool -flag considered harmful

andrew at alice.UUCP andrew at alice.UUCP
Thu Jun 16 03:56:44 AEST 1988



the following clarification may be well known to some but i have
received sufficent enquiries to warrant an explanation.

firstly, -1 and -l involve exactly the same amount of work.
the only difference is that in the latter, the filename is printed and in the
former, the line is printed. In both cases, getting a hit stops the processing
for that file.

-s is potentially faster in that after we get a hit, all we have to do is
try opening the remaining file arguments (in case we have to return a 2 for
inaccessible file arguments). in practise, no one bothers to write this
separate loop and they use the same code as -l.



More information about the Comp.unix.wizards mailing list