sysctl with regex?
Dag-Erling Smørgrav
des at des.no
Thu Feb 11 09:36:23 UTC 2010
Garrett Cooper <yanefbsd at gmail.com> writes:
> Dag-Erling Smørgrav <des at des.no> writes:
> > Garrett Cooper <yanefbsd at gmail.com> writes:
> > > Dag-Erling Smørgrav <des at 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 - des at des.no
More information about the freebsd-hackers
mailing list