On Tue, 2006-07-25 at 08:52 -0600, Jeff Schroeder wrote:
> Alex:
>
> > Do the { } work for the `find` command also? I was having the same
> > problems the other day and ended up using a grep expression to narrow
> > down the results of a find because of the errors with [ ].
>
> The curly brackets are expanded by the shell to allow multiple pattern
> matches. Think of it like the parentheses in regular expressions:
>
> bash = {this,or,that}
> Perl = (this|or|that)
>
> I'm not sure what you mean about using them with find, but I suppose you
> could do something like this:
>
> find -type f | grep -E "(this|or|that)"
I think he means
find -name "{this,that}*"
>
> which would use grep to match any of those patterns in your filenames.
>
> HTH,
> Jeff
> /*
> PLUG: http://plug.org, #utah on irc.freenode.net
> Unsubscribe: http://plug.org/mailman/options/plug
> Don't fear the penguin.
> */
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/