[clue-tech] shell globbing and case

David L. Anselmi anselmi at anselmi.us
Mon Mar 1 21:08:36 MST 2010


David L. Willson wrote:
> Does anyone have a recommendation for an on-line or local resource with a good discussion of the
> the capabilities?  It's not regular regex, but it's a Heck of a lot more than just * and ?, too.

Have you read Pattern Matching in bash(1)?

> I'm trying to setup a case statement, something like this plain English.
>
> (one or more digits)
> (one or more digits, followed by a colon)
> (a colon, followed by one or more digits)
> (one or more digits, a colon, one or more digits)

So for ease of localization and such Perl might be a better language.

Or have you looked to see whether there's a command that will do Perl regexs in the shell?  I've 
said the same about parsing XML but it turns out there's pyx that's intended to be used from the shell.

Dave


More information about the clue-tech mailing list