[ic] customising email order result

Jon interchange-users@icdevgroup.org
Tue Oct 29 19:04:01 2002


Kevin Walsh wrote:

> 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"`
>

    In my opinion the true beauty of UNIX (eg  Linux) is the many many
ways you can so easily customize such simple things to perform fairly
powerful tasks.  And here are but just a couple of examples while I had
only provided one.

Jon