|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
a.velichinsky
gmail.com
Date: Thu Feb 21 2008 - 18:55:23 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Feb 22, 2008 at 12:08:54AM +0200, Jussi Peltola wrote:
> On Thu, Feb 21, 2008 at 11:22:25PM +0200, a.velichinsky
gmail.com wrote:
> > For instance 'ggrep -r ...' instead of 'grep -r ...' to search recursively
> > with gnu grep (a worthless feature imho).
>
> Displaying the name of the file and the matched line nicely like grep -r
> does is not elegant with find + grep without using a script or a long
> and inelegant alias - or if it is, I'd be interested in how it can be
> done in case I need to work on some ancient unix.
$ find DIR -type f -print0 | xargs -0 grep PATTERN
which, unlike 'find ... -exec' is just as fast as 'grep -r', and unlike
'grep -r', will skip special devices, symlinks, etc.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]