[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [hobbit] PCRE regular expressions (help?)
- To: <hobbit (at) hswn.dk>
- Subject: RE: [hobbit] PCRE regular expressions (help?)
- From: "Kauffman, Tom" <KauffmanT (at) nibco.com>
- Date: Mon, 2 May 2005 16:18:31 -0500
- Thread-index: AcVPWQZgk1X/TiJcR5WSQhStDeQiZQAA26Zw
- Thread-topic: [hobbit] PCRE regular expressions (help?)
That fixes it!
Tom
-----Original Message-----
From: Henrik Stoerner [mailto:henrik (at) hswn.dk]
Sent: Monday, May 02, 2005 3:53 PM
To: hobbit (at) hswn.dk
Subject: Re: [hobbit] PCRE regular expressions (help?)
On Mon, May 02, 2005 at 12:47:15PM -0500, Kauffman, Tom wrote:
> I thought I knew what I was doing, but apparently not:
>
> PCRE compile of NORRDDISKS='^/oracle/PRD/sapdata.*' failed
>
> I'm trying to use the patch Henrik so kindly provided earlier.
Hmm - it's not my lucky day for doing patches, sorry.
There's a clear cut'n'paste bug in the patch I sent out:
Line 39 of hobbitd/larrd/do_disk.c reads:
if (!inclpattern) errprintf("PCRE compile of NORRDDISKS ....
It was meant to test the *exclude* pattern there, so it should be
if (!exclpattern) errprintf("PCRE compile of NORRDDISKS ....
This means you'll get that error-message no matter what you put into
the NORRDDISKS variable.
> And what I really want to suppress (shell syntax) is:
> /oracle/*/sapdata*
> /oracle/*/data?
> /oracle/*/mirr*
> /oracle/*/orig*
>
> Here's the generic I tried:
> PCRE compile of
NORRDDISKS='^/oracle/.../sapdata.*|^/oracle/.../mirr.*|^/oracle/.../orig
.*|^/oracle/.../data.*' failed
I tested it with this one:
NORRDDISKS="^/oracle/[a-z,0-9]+/sapdata.*|^/oracle/[a-z,0-9]+/mirr.*|^/o
racle/[a-z,0-9]+/orig.*|^/oracle/[a-z,0-9]+/data.*"
Feeding it some hand-crafted disk status messages it seems to work OK.
Note that hobbitserver.cfg is processed by a C program, not a shell
tool. So you shouldn't need to escape any of the special characters.
Henrik
To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe (at) hswn.dk