OT: Unix question
Bill Vermillion
fp at wjv.com
Thu Apr 15 09:08:16 PDT 2004
On Thu, Apr 15, 2004 at 11:46:14AM -0400, George Simon thus spoke:
>
> I?m trying to locate a certain string in prc.* tables.
> I?m using the following:
> grep rcpt\(54\)= prc.*
> Is there a flag that I can use to make it search all the directories under
> filePro?
> Something similar to /s in DOS/Windows?
Don't know about that as I live in Unix most of the time.
> Or is there another command I should be using instead of grep?
You can combine the grep with other unix tools.
start in the hierarchy you wish to search so you don't search all
the drive but cd'ing to the top of that tree.
Then you can do sometthing similar to this:
find . -exec grep ' -name prc\.* -exec grep rcpt\(54]) {} /dev/null
;\
The find will travese the tree. The prc.\* will limit it to manes
that start with prc, the {} gets filled in with the argument from
find, and the /dev/null means it will also search /dev/null for
the name.
That is non-intutive but without the /dev/null you will just have
the lines containing your search phrase. By telling it too look in
/dev/null the the file name in which the search phrase is found
will be printed, followed by a : and then the line.
Otherwise you just get the lines and don't know what files they are
in.
That's just one way to do it.
Bill
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
--
Bill Vermillion - bv @ wjv . com
More information about the Filepro-list
mailing list