[ic] customising email order result

Kevin Walsh interchange-users@icdevgroup.org
Tue Oct 29 07:08:00 2002


Jon [prtyof5@attglobal.net]
> This will likely be duh information to most, if not all, people that read
> this list
> but just in case someone finds it useful as a method for searching for stuff
> buried deep inside IC somewhere use the following.
> One of my often used unix commands:
> 
> find . -name "*" -exec grep "string" \{\} \; -print
> 
> Basically search all files ( name "*" ) starting at the current directory  (
> the dot )
> and search inside each file ( the grep command ) for the specified string.
> Of course that can be tweaked in many ways.
> 
I use the following to cut down on the number of execs and to show the
name of the file(s) that contain the text.  It's easier to type too,
which is always a bonus. :-)

    find . -type f -print|xargs grep "some text here"

That can be changed slightly to open an editor with a list of filenames,
allowing you to edit each of the files that contain the text, one by one:

    vi `find . -type f -print|xargs grep -l "some text"`

Have fun.

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/