autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AS_DIRNAME and expr


From: Paul Berrevoets
Subject: Re: AS_DIRNAME and expr
Date: Fri, 17 Nov 2000 22:06:15 -0500

Akim: I'm curious as to how you plan to use this information. I got the
impression that you were suggesting to use something like:

expr foo : '\(bar\)' \| a : 'a\(\)

but beware that this behaves on different machines:
solaris$ expr foo : '\(bar\)' \| a : 'a\(\)
0
solaris$
linux$ expr foo : '\(bar\)' \| a : 'a\(\)

linux$
hpux$ expr foo : '\(bar\)' \| a : 'a\(\)

hpux$

Sorry if I got the wrong impression.
--
Paul Berrevoets

David Morgan wrote:

> > I meant that when `:' fails, it returns `0' instead of `', so it is my
> > understanding of `expr' that using \| '' at the end is enough.  This
> > fix is probably all we need to fix the affected expr uses.
> >
> > Still, David, could you confirm that \(\) properly matches the empty
> > string: running
> >
> > expr 'a' : 'a\(\)'
> >
> > should definitely output nothing (and most probably exit 1 :)
>
> Yep as expected on QNX 4.2.5
>
> expr 'a' : 'a\(\)'
> >
> outputs nothing and exits 1
>
> Regards
>  David




reply via email to

[Prev in Thread] Current Thread [Next in Thread]