bug-gnulib
[Top][All Lists]
Advanced

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

Re: maint.mk: sed portability


From: Paul Eggert
Subject: Re: maint.mk: sed portability
Date: Wed, 23 May 2012 23:25:09 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 05/23/2012 02:23 AM, Jim Meyering wrote:
> +     | sed -n '/^\[GNUPG:\] ERRSIG /{s///;s/ .*//p;q;}')

The use of {...;...} isn't portable in sed scripts.  You
have to write it something like this instead, I'm afraid:

| sed -n '/^\[GNUPG:\] ERRSIG /{
    s///
    s/ .*//p
    q
}'

except of course this can't easily be done in a Makefile.

This restriction is in POSIX-2008 and I've been burned by
it with some less-commonly-used sed implementations
(Interix or something like that....).  Dunno if this
matters in a 'maint' rule, but Akim's report was
about 'sed' portability, so I thought I'd mention it.



reply via email to

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