Re: FYI: Sed portability (Was: sed usage in autoheader)

2000-11-16 Thread Paul Eggert
> From: Akim Demaille <[EMAIL PROTECTED]> > Date: 16 Nov 2000 10:45:57 +0100 > We do agree `/foo[\/]bar/' is a single pattern which matches the > string `foo/bar', right? Then, why do you use the char class here? Because, if my admittedly fallible memory serves, some older hosts mishandle /foo\

Re: FYI: Sed portability (Was: sed usage in autoheader)

2000-11-16 Thread Johan Danielsson
Akim Demaille <[EMAIL PROTECTED]> writes: > We do agree `/foo[\/]bar/' is a single pattern which matches the > string `foo/bar', right? It matches the strings `foo/bar' and `foo\bar', if you believe in SUS. /Johan

Re: sed usage in autoheader

2000-11-16 Thread Johan Danielsson
Paul Eggert <[EMAIL PROTECTED]> writes: > > From: Akim Demaille <[EMAIL PROTECTED]> > > Do you mean `s,[^/]*$,,' would work here? Yes. > Just for the record, Cray is correct: POSIX does not allow > `s/[^/]*$//'. `s,[^/]*$,,' is required to work, though. How does POSIX differ from Single UN

FYI: Sed portability (Was: sed usage in autoheader)

2000-11-16 Thread Akim Demaille
| > From: Akim Demaille <[EMAIL PROTECTED]> | > Date: 15 Nov 2000 16:32:18 +0100 | > | > Do you mean `s,[^/]*$,,' would work here? Man, how can someone write | > something that broken :(. | | Just for the record, Cray is correct: POSIX does not allow | `s/[^/]*$//'. `s,[^/]*$,,' is required t

Re: sed usage in autoheader

2000-11-15 Thread Bruce Korb
Paul Eggert wrote: > > > Bruce> never, ever use substitution separator > > Bruce> chars inside of the substitution expressions, period. > > I've had good luck with strings like `/foo[\/]bar/' in cases where I > already know from context that the matched string can't contain `\'. > That's portabl

Re: sed usage in autoheader

2000-11-15 Thread Paul Eggert
> From: Akim Demaille <[EMAIL PROTECTED]> > Date: 15 Nov 2000 16:32:18 +0100 > > Do you mean `s,[^/]*$,,' would work here? Man, how can someone write > something that broken :(. Just for the record, Cray is correct: POSIX does not allow `s/[^/]*$//'. `s,[^/]*$,,' is required to work, though.

Re: sed usage in autoheader

2000-11-15 Thread Akim Demaille
> "Bruce" == Bruce Korb <[EMAIL PROTECTED]> writes: Bruce> Johan Danielsson wrote: >> Autoheader does `sed "s/[^/]*$//"', which doesn't work with Cray >> sed, and Cray claims this is in compliance with POSIX. Is this >> correct? Bruce> It is irrelevant. If true and Cray changes, there will

Re: sed usage in autoheader

2000-11-15 Thread Bruce Korb
Johan Danielsson wrote: > > Autoheader does `sed "s/[^/]*$//"', which doesn't work with Cray sed, > and Cray claims this is in compliance with POSIX. Is this correct? It is irrelevant. If true and Cray changes, there will still be versions floating around wherein it is broken. More cruft for t

sed usage in autoheader

2000-11-15 Thread Johan Danielsson
Autoheader does `sed "s/[^/]*$//"', which doesn't work with Cray sed, and Cray claims this is in compliance with POSIX. Is this correct? /Johan