zsh-users
 help / color / mirror / code / Atom feed
* Glob and grep
@ 2019-12-16 22:44 Nick Cross
  2019-12-16 23:10 ` Mikael Magnusson
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Nick Cross @ 2019-12-16 22:44 UTC (permalink / raw)
  To: Zsh Users


Hi,

While I've been able to find varying amounts of information on the net I 
haven't found quite enough to get the following working.

I would like to condense the following into a single grep / glob 
expression where I search recursively through a directory tree, ignoring 
any sub-trees starting with 'test' or 'target'.

grep <pattern> **/*.groovy  | egrep -v "(/test/|/target/)"

While I found information about ^(xxx) it wasn't clear how to have 
multiple expressions to ignore.

Am I right in thinking I can add (.) to e.g. *.groovy to ensure I only 
search for files as well ?


Thanks

Nick

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-12-17 10:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-16 22:44 Glob and grep Nick Cross
2019-12-16 23:10 ` Mikael Magnusson
2019-12-16 23:24   ` Dominik Vogt
2019-12-17  1:20     ` Daniel Shahaf
2019-12-17  7:31       ` Nick Cross
2019-12-17  7:31   ` Nick Cross
2019-12-17  9:39     ` Mikael Magnusson
2019-12-16 23:18 ` dana
2019-12-17  7:30   ` Nick Cross
2019-12-17 10:00 ` zzapper

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).