Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Sep 2022 07:33:50 +0100
From:      Steve O'Hara-Smith <steve@sohara.org>
To:        questions@freebsd.org
Subject:   Re: Slightly OT: How to grep for two different things in a file
Message-ID:  <20220908073350.2c16bf4e2c908c0ad007af3e@sohara.org>
In-Reply-To: <YxkhieQ2omb3sr5s@harpo.local>
References:  <CAGBxaXn6ZO-e0746fwzNp%2Bv-6bAucjxePMOt-mEv2HKmkCBXcg@mail.gmail.com> <YxkhieQ2omb3sr5s@harpo.local>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 8 Sep 2022 00:56:09 +0200
Andreas Kusalananda Kähäri <andreas.kahari@abc.se> wrote:

> 	find src/java -type f \
> 		-exec grep -qF 'tid' {} \; \
> 		-exec grep -qF '/tmp' {} \; \
> 		-print

	This is the best solution.

-- 
Steve O'Hara-Smith <steve@sohara.org>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220908073350.2c16bf4e2c908c0ad007af3e>