Garrett Cooper <yanef...@gmail.com> writes:
> Dag-Erling Smørgrav <d...@des.no> writes:
> > Garrett Cooper <yanef...@gmail.com> writes:
> > > Dag-Erling Smørgrav <d...@des.no> writes:
> > > > The glob pattern syntax has no equivalent for +, ?, {m,n},
> > > > (foo|bar), etc.
> > > +, {}, and () -- no... that's typically an extension to shell expanded
> > > values (IIRC). ?
> > I can't make sense of this - I'm not sure whether you misunderstood what
> > I wrote, or just failed to express yourself clearly...
> Ok -- redo: +, {} and () aren't typical shell glob operators.

I never said they were...

> They're typically extensions in certain shells (bash for instance).

I don't know of any shell where {} has the same meaning as in regular
expressions; it's usually an alternation that's evaluated before
globbing.  For instance, in both bash and zsh, the following will create
foo.txt, bar.txt and baz.txt:

  touch {foo,bar,baz}.txt

whereas if {} were evaluated during globbing, the glob pattern wouldn't
match anything, and the command would either fail or create the file
"{foo,bar,baz}.txt".

Zsh has # for +, <m-n> for {m,n} and (foo|bar) for (foo|bar) (it treats
the pipe character differently when it's inside parentheses).  Bash has
neither of these.

DES
-- 
Dag-Erling Smørgrav - d...@des.no
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to