bug-autoconf
[Top][All Lists]
Advanced

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

Re: buggy sed on Darwin?


From: Noah Misch
Subject: Re: buggy sed on Darwin?
Date: Sun, 12 Mar 2006 13:26:37 -0800
User-agent: Mutt/1.5.6i

On Sun, Dec 11, 2005 at 12:34:42PM +0100, Werner LEMBERG wrote:
> Consider this pipeline
> 
>   makeinfo --version | sed 's/^.* \([^ ]\+\)$/\1/;1q'
> 
> with GNU sed 4.0.9 I get
> 
>   4.8
> 
> but with the (BSD) sed from OS X I get
> 
>   makeinfo (GNU texinfo) 4.8
> 
> I wonder whether this is a BSD sed bug or whether I'm doing something
> wrong.

GNU sed recognizes `\+' as shorthand for `\{1,\}', but POSIX leaves its meaning
undefined.  I suspect BSD sed treats it like literal `+'.

Consider using this:

  makeinfo --version | sed 's/.* //;q'

Please accept my apologies for the delay in responding to your query.




reply via email to

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