Hi,
On Thu, Dec 13, 2007 at 09:44:30AM +0100, Raoul Bhatia [IPAX] wrote:
> Rodrigo Pereira wrote:
>> I had to change a line on the Xen_Status() function to make it work,
>> otherwise it would not detect status correctly.
>> The line is:
>> echo "${STATUS}" | grep -qs "[r--][-b-][--p]---"
>> I initially escaped the first two "--", did the trick. Then decided to
>> play
>> safer with egrep -qs 'r-----|-b----|-----p' because the first grep matches
>> ------ (probably this never happens, doesn't hurt though).
>
> first of all, please mind that i'm by no way familiar with xcen.
> being said, what is the final outcome on this one :)
>
> and would you be so kind to explain what "[r--][-b-][--p]---" does,
> as it does not seem to function at my side.
>
>> $ echo "r-----" | grep -qs "[r--][-b-][--p]---"; echo $?
>> 1
>> $ echo "------" | grep -qs "[r--][-b-][--p]---"; echo $?
>> 1
>
> what i can imagine is, that you wanted to match "[r-][b-][p-]---",
> which does the "trick" (including the "------" flaw you described).
>
>> $ echo "r-----" | grep -qs "[-r][-b][-p]---"; echo $?
>> 0
> > $ echo "------" | grep -qs "[-r][-b][-p]---"; echo $?
> > 0
This one is the good regexp.
Thanks,
Dejan
>
> maybe using egrep "(r--|-b-|--p)---" would be the regex you wanted to
> use?
>
> cheers,
> raoul bhatia
> --
> ____________________________________________________________________
> DI (FH) Raoul Bhatia M.Sc. email. [EMAIL PROTECTED]
> Technischer Leiter
>
> IPAX - Aloy Bhatia Hava OEG web. http://www.ipax.at
> Barawitzkagasse 10/2/2/11 email. [EMAIL PROTECTED]
> 1190 Wien tel. +43 1 3670030
> FN 277995t HG Wien fax. +43 1 3670030 15
> ____________________________________________________________________
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems