grep
Doug Gwyn
gwyn at smoke.brl.mil
Wed Apr 17 06:26:37 AEST 1991
In article <8304 at idunno.Princeton.EDU> subbarao at phoenix.Princeton.EDU (Kartik Subbarao) writes:
>grep pattern */* (i.e matches all files of all subdirectories)
Often this method will exceed the number of characters allowed for arguments.
>find . -exec grep pattern "{}" \;
>find . -print | xargs grep pattern.
These will fail to print the file name (in the xargs case, it fails
only occasionally). Basically the problem is nonuniform design of
grep's semantics. To get reasonable behavior, try
find . -print | xargs grep pattern /dev/null
More information about the Comp.unix.questions
mailing list