From owner-freebsd-questions@FreeBSD.ORG Wed Feb 4 16:15:18 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13488106564A for ; Wed, 4 Feb 2009 16:15:18 +0000 (UTC) (envelope-from marshc187@gmail.com) Received: from mail-ew0-f21.google.com (mail-ew0-f21.google.com [209.85.219.21]) by mx1.freebsd.org (Postfix) with ESMTP id 8E2918FC12 for ; Wed, 4 Feb 2009 16:15:17 +0000 (UTC) (envelope-from marshc187@gmail.com) Received: by ewy14 with SMTP id 14so4347514ewy.19 for ; Wed, 04 Feb 2009 08:15:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=n6g7WF3HmrRL07/K4tzizjvjT8ReGlyxVioun4KGaiI=; b=fVVKNFeicXXPJdCLrHecq+8+4MK/+NEdVdb1GA7yD6sL0dpJwtFYY2J2YGIN5USADU RnZbQ0twDwMxJDINWx/ydEhbx9sy10vyQHHWQYq4ddOPgrEANp5iokSyK1esoxH1vDyz ne9YFTMfGbfDCopMVzmmH7CnuJHnh/PzjXlcE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=nakW+D20MYM704W6AVpBi6OgGtDfKJeI4v8ntvrdYHg9AkVA3eay3oGS3F3x+TUpPM BK04NobhoGk1E3VUKehKTMitbZgiTBW8ijU2AO7mqLZflOealoK/y/f/A/y0Z8X/OD86 RUhXVuZym3aJVvRiyEeva3Vo2ScAGjFwueDiM= MIME-Version: 1.0 Received: by 10.210.65.17 with SMTP id n17mr7001705eba.106.1233764114442; Wed, 04 Feb 2009 08:15:14 -0800 (PST) In-Reply-To: <20090204091459.G16842@qroenaqrq.6qbyyneqvnyhc.pbz> References: <332f78510902040635k6675a9b6u434879b42c66a579@mail.gmail.com> <20090204091459.G16842@qroenaqrq.6qbyyneqvnyhc.pbz> Date: Wed, 4 Feb 2009 17:15:14 +0100 Message-ID: <332f78510902040815s2134763dh64b914f9234eb0eb@mail.gmail.com> From: t-u-t To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: shell commands - exclusion X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2009 16:15:18 -0000 On Wed, Feb 4, 2009 at 4:26 PM, Lars Eighner wrote: > > In general this is not possible. A few commands have exclusion options, > but > not many. Some shells have ways of managing glob exclusion (it's the shell > that expands wildcard patterns). Setting GLOBIGNORE works in BASH, whether > something similar works in others, you will have to investigate yourself. > But that isn't one line as you have to set GLOBIGNORE. BASH also has an > extended pattern matching option which includes negation, so you might want > to look into that. > pkg_delete can take regular expression arguments (see -x). Perhaps you > can devise one that will do the trick. Beware, however: it can take > multiple regular expressions and deletes package which match ANY (not all) > of them. > Shell globbing is the operation by which the shell expands wildcards and > finds matches. What you want to do exclude things from shell globbing. > watch out anything involving recursion --- things can happen that you don't > expect unless you really know what you are doing. > thank you, i can keep to regular painstaking methods for now, but would like to get the hang of it in future;. knowing what i'm looking for now is a big step for me. thanks again