Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!wuarchive!psuvax1!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.unix.questions Subject: Re: grep Keywords: grep, recursive Message-ID: <15864@smoke.brl.mil> Date: 16 Apr 91 20:26:37 GMT References: <1991Apr14.214414.9815@hellgate.utah.edu> <8304@idunno.Princeton.EDU> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 12 In article <8304@idunno.Princeton.EDU> subbarao@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