shell commands - exclusion

t-u-t marshc187 at gmail.com
Wed Feb 4 08:15:18 PST 2009


On Wed, Feb 4, 2009 at 4:26 PM, Lars Eighner <luvbeastie at larseighner.com>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


More information about the freebsd-questions mailing list