[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sed --posix does not catch incomplete arguments
From: |
Bruno Haible |
Subject: |
Re: sed --posix does not catch incomplete arguments |
Date: |
Fri, 18 Jun 2010 13:27:29 +0200 |
User-agent: |
KMail/1.9.9 |
Hi Eric,
> About the only portable alternative that I could think of for a makefile
> would be to use multiple echo (or printf) into a temporary file, then
> use sed -f file, rather than relying on multiple -e.
The makefile can also construct a newline as contents of a shell variable.
In Makefile syntax:
stmt=`echo "nl='"; echo "'"`; eval "$$stmt"; : | sed -e "1{$${nl}}"
> The Austin group
> take this morning is that allowing -e fragments is a useful addition for
> the next revision of the standard, but that there are still
> implementations today (like AIX) that don't support it now, so it will
> be several years before sed -e 1{ -e } is standardized.
Thanks for bringing it up with the Austin group!
Bruno
Re: sed --posix does not catch incomplete arguments, Paolo Bonzini, 2010/06/11