From nobody Thu Sep 8 06:33:50 2022 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MNTq75fXZz4cHNG for ; Thu, 8 Sep 2022 06:33:55 +0000 (UTC) (envelope-from 4250.82.1d4f0000000b58c.5006bcdd2599f662e868e6ca21cb24ca@email-od.com) Received: from s1-b0c6.socketlabs.email-od.com (s1-b0c6.socketlabs.email-od.com [142.0.176.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4MNTq66R4Mz3SQ9 for ; Thu, 8 Sep 2022 06:33:54 +0000 (UTC) (envelope-from 4250.82.1d4f0000000b58c.5006bcdd2599f662e868e6ca21cb24ca@email-od.com) DKIM-Signature: v=1; a=rsa-sha256; d=email-od.com;i=@email-od.com;s=dkim; c=relaxed/relaxed; q=dns/txt; t=1662618835; x=1665210835; h=content-transfer-encoding:content-type:mime-version:references:in-reply-to:message-id:subject:to:from:date:x-thread-info:subject:to:from:cc:reply-to; bh=EN4JVkHI/FLVyBG3PPYoRV194nCuldZg7/t+Npfkrww=; b=CYvOGzhfqqiZHGavAyi6nwVIv8ndsARlA3IyfIoUS7AKWwVCYkF6rL8XI9fmhaUtucA30/p7fDzt+wDauds1a10rXEOZdjfAaZdnQxeN1rRX4sWysN/MDnT+eMQrjwJEbmI88Mlt9tH+peGfZGb/pBfF9F1m5E+lf42pfB8LJ6o= X-Thread-Info: NDI1MC4xMi4xZDRmMDAwMDAwMGI1OGMucXVlc3Rpb25zPWZyZWVic2Qub3Jn Received: from r3.us-west-2.aws.in.socketlabs.com (r3.us-west-2.aws.in.socketlabs.com [142.0.190.3]) by mxsg2.email-od.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Thu, 8 Sep 2022 02:33:54 -0400 Received: from smtp.lan.sohara.org (EMTPY [185.202.17.215]) by r3.us-west-2.aws.in.socketlabs.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Thu, 8 Sep 2022 02:33:53 -0400 Received: from [192.168.63.1] (helo=steve.lan.sohara.org) by smtp.lan.sohara.org with smtp (Exim 4.94.2 (FreeBSD)) (envelope-from ) id 1oWB6l-0005oP-2K for questions@freebsd.org; Thu, 08 Sep 2022 07:33:51 +0100 Date: Thu, 8 Sep 2022 07:33:50 +0100 From: Steve O'Hara-Smith 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: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.0) X-Clacks-Overhead: "GNU Terry Pratchett" List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4MNTq66R4Mz3SQ9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=email-od.com header.s=dkim header.b=CYvOGzhf; dmarc=none; spf=pass (mx1.freebsd.org: domain of 4250.82.1d4f0000000b58c.5006bcdd2599f662e868e6ca21cb24ca@email-od.com designates 142.0.176.198 as permitted sender) smtp.mailfrom=4250.82.1d4f0000000b58c.5006bcdd2599f662e868e6ca21cb24ca@email-od.com X-Spamd-Result: default: False [-2.70 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[steve@sohara.org,4250.82.1d4f0000000b58c.5006bcdd2599f662e868e6ca21cb24ca@email-od.com]; R_SPF_ALLOW(-0.20)[+ip4:142.0.176.0/20:c]; R_DKIM_ALLOW(-0.20)[email-od.com:s=dkim]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[questions@freebsd.org]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7381, ipnet:142.0.176.0/22, country:US]; RCVD_IN_DNSWL_NONE(0.00)[142.0.190.3:received]; RCVD_TLS_LAST(0.00)[]; FROM_NEQ_ENVFROM(0.00)[steve@sohara.org,4250.82.1d4f0000000b58c.5006bcdd2599f662e868e6ca21cb24ca@email-od.com]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[email-od.com:+]; DMARC_NA(0.00)[sohara.org]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DWL_DNSWL_NONE(0.00)[email-od.com:dkim] X-ThisMailContainsUnwantedMimeParts: N On Thu, 8 Sep 2022 00:56:09 +0200 Andreas Kusalananda Kähäri wrote: > find src/java -type f \ > -exec grep -qF 'tid' {} \; \ > -exec grep -qF '/tmp' {} \; \ > -print This is the best solution. -- Steve O'Hara-Smith