From owner-freebsd-questions@freebsd.org Fri Jun 21 04:40:02 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D0DB15D0193 for ; Fri, 21 Jun 2019 04:40:02 +0000 (UTC) (envelope-from roberthuff@rcn.com) Received: from smtp.rcn.com (smtp.rcn.com [69.168.97.78]) (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 8890475650 for ; Fri, 21 Jun 2019 04:40:00 +0000 (UTC) (envelope-from roberthuff@rcn.com) DKIM-Signature: v=1; a=rsa-sha1; d=rcn.com; s=20180516; c=relaxed/simple; q=dns/txt; i=@rcn.com; t=1561091994; h=From:Subject:Date:To:MIME-Version:Content-Type; bh=qSg2+4+1GZrdxh4/2OMb07qvoXQ=; b=Ub3pI55slwfYYLtYkTryy7j5AaDv9iJUsEF5RqMfBmIF7CgT/0EL18ZjzLHOnBSf DHxZAOkPtfI1sCeIGXFiGQxeijAnq48urBkwaily3UmjRH1ADW9EQeHyDgZNo7Ct +y0zVhl3adLRVCiOA9C7o7CV9/iYhxnXfmWL0rkwowIQ/l+OEE6RXAtm8lrE98Nu yu90R0+BA8zcrVfCDzNHyZttpNPtKnZsWT9yyZWgyxCRiAahwAbF+dqzUPp6kajL L1l0KusoUdPbnoWYssM7jN8CDZvnUTXAL0z5oUc8CWwgtVYuVgI+Ij17q18N/5cU MsVkcSi5PdHuGKyCS5CFcA==; X_CMAE_Category: , , X-CNFS-Analysis: v=2.2 cv=aKGykv1m c=1 sm=1 tr=0 a=9TgA2UwI6Wy+6BV4wQM/cQ==:117 a=9TgA2UwI6Wy+6BV4wQM/cQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=KGjhK52YXX0A:10 a=kj9zAlcOel0A:10 a=XRQyMpdBKAEA:10 a=dq6fvYVFJ5YA:10 a=48faUk6PgeAA:10 a=KYTo1BJhUPDvMax_eFAA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 a=CjuIK1q_8ugA:10 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine X-Authed-Username: cm9iZXJ0aHVmZkByY24uY29t Authentication-Results: smtp03.rcn.cmh.synacor.com header.from=roberthuff@rcn.com; sender-id=softfail Authentication-Results: smtp03.rcn.cmh.synacor.com smtp.user=roberthuff; auth=pass (PLAIN) Received: from [209.6.230.48] ([209.6.230.48:55400] helo=jerusalem.litteratus.org.litteratus.org) by smtp.rcn.com (envelope-from ) (ecelerity 3.6.25.56547 r(Core:3.6.25.0)) with ESMTPSA (cipher=AES256-GCM-SHA384) id B4/3A-13517-A9F5C0D5; Fri, 21 Jun 2019 00:39:54 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <23820.24473.509724.279485@jerusalem.litteratus.org> Date: Fri, 21 Jun 2019 00:39:53 -0400 From: Robert Huff To: Polytropon Cc: FreeBSD Questions Subject: How to un-select files in shell wildcard patterns In-Reply-To: <20190621054909.c6ba47ab.freebsd@edvax.de> References: <20190621054909.c6ba47ab.freebsd@edvax.de> X-Mailer: VM 8.2.0b under 26.2 (amd64-portbld-freebsd13.0) X-Rspamd-Queue-Id: 8890475650 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=rcn.com header.s=20180516 header.b=Ub3pI55s; dmarc=pass (policy=none) header.from=rcn.com; spf=pass (mx1.freebsd.org: domain of roberthuff@rcn.com designates 69.168.97.78 as permitted sender) smtp.mailfrom=roberthuff@rcn.com X-Spamd-Result: default: False [-2.74 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(0.00)[rcn.com:s=20180516]; RBL_NIXSPAM(4.00)[78.97.168.69.ix.dnsbl.manitu.net]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:69.168.97.0/24]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; BAD_REP_POLICIES(0.10)[]; DWL_DNSWL_LOW(-1.00)[rcn.com.dwl.dnswl.org : 127.0.5.1]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[rcn.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(0.00)[rcn.com,none]; MX_GOOD(-0.01)[mx.rcn.com]; NEURAL_HAM_SHORT(-0.85)[-0.852,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-2.78)[ip: (-9.30), ipnet: 69.168.97.0/24(-4.59), asn: 36271(0.07), country: US(-0.06)]; ASN(0.00)[asn:36271, ipnet:69.168.97.0/24, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[78.97.168.69.list.dnswl.org : 127.0.5.1] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jun 2019 04:40:02 -0000 Polytropon writes: > I'm interested in a convenient method to "un-select" files > when using regular (sh) shell wildcards. It's quite easy to > describe things like > > *.tex > > to perform an operation on all LaTeX source files, or > > *a* > > on all files whose name contains (at least) one "a". Patterns > that are based on the inclusion of certain attributes are not > a problem to deal with using the builtin pattern matching of > the shell. > > But what about the opposite? Let's say, perform an operation > on all files _except_ the LaTeX source files, or all files > whose name does _not_ contain an "a"? > > Is there a good method to do this, except creating a kind > of "custom regex wrapper script" that does the selection part, > for further use with `subshell` or | xargs? Um ... does Polyt> ls -al "*^a*"