It certainly does matter that it's Unix grep, because that allows you
to pipe and invert, which is far easier and probably faster too.

To get everything that contains 'master' you'd do:
    grep -ir 'master' ./*

And to get get everything that does NOT contain 'california' you use:
    grep -irv 'california' ./*

Where:
        -i means case-Insensitive
        -r means Recursively scan directories.
        -v means inVerted (negative search)
and -ir or -irv combined does both/all of those.

The ./* is the files to search (i.e. everything in the current
directory - and, due to the -r flag, everything in any sub-directories
too).

To put the two commands together, you chain them with a pipe character, like so:

    grep -ir 'master' ./* | grep -iv 'california'

For the second command here, you don't need the ./* part because it
accepts the list of files that matched the first command as its input.

Hopefully that all makes sense?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1239
Subscription: http://www.houseoffusion.com/groups/regex/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/regex/unsubscribe.cfm

Reply via email to