[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
- Re: Success (mostly) with the testsuite, (continued)
- Re: Success (mostly) with the testsuite, David Morgan, 2000/11/09
- Re: AS_DIRNAME and expr, Paul Eggert, 2000/11/09
- Re: AS_DIRNAME and expr, David Morgan, 2000/11/09
- Re: AS_DIRNAME and expr, Paul Eggert, 2000/11/09
- Re: AS_DIRNAME and expr, Akim Demaille, 2000/11/10
- Re: AS_DIRNAME and expr, Paul Eggert, 2000/11/10
- Re: AS_DIRNAME and expr, Alexandre Oliva, 2000/11/11
- Re: AS_DIRNAME and expr, Paul Eggert, 2000/11/11
- Re: AS_DIRNAME and expr, Akim Demaille, 2000/11/16
- Re: AS_DIRNAME and expr, David Morgan, 2000/11/16
- Re: AS_DIRNAME and expr,
Paul Berrevoets <=
- Re: AS_DIRNAME and expr, Akim Demaille, 2000/11/29
- Re: AS_DIRNAME and expr, Paul Eggert, 2000/11/29
- Re: AS_DIRNAME and expr, Akim Demaille, 2000/11/29
- Re: AS_DIRNAME and expr, Akim Demaille, 2000/11/29
- Re: AS_DIRNAME and expr, Paul Berrevoets, 2000/11/29
- Re: AS_DIRNAME and expr, Akim Demaille, 2000/11/29
- Re: AS_DIRNAME and expr, Akim Demaille, 2000/11/10
- Re: AS_DIRNAME and expr, Paul Eggert, 2000/11/10
Re: Success (mostly) with the testsuite, Akim Demaille, 2000/11/29