[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sed --posix does not catch incomplete arguments
From: |
Ralf Wildenhues |
Subject: |
Re: sed --posix does not catch incomplete arguments |
Date: |
Fri, 11 Jun 2010 23:10:00 +0200 |
User-agent: |
Mutt/1.5.20 (2009-10-28) |
Hello Bruno,
* Bruno Haible wrote on Fri, Jun 11, 2010 at 09:41:27PM CEST:
> Quoting <http://www.opengroup.org/onlinepubs/9699919799/utilities/sed.html>:
> "-e script
> Add the editing commands specified by the script
> option-argument to the end of the script of editing commands.
> The script option-argument shall have the same properties as
> the script operand, described in the OPERANDS section."
>
> Since "sed '1{'" is invalid
>
> $ sed '1{'
> sed: -e expression #1, char 0: unmatched `{'
> $ sed --posix '1{'
> sed: -e expression #1, char 0: unmatched `{'
>
> passing the script '1{' to option -e is also invalid.
Ouch. That would be a problem, because not splitting brace arguments to
multiple -e options (or introducing embedded newlines) is not portable
to some non-GNU seds. IIRC. I'll check. GNU software uses this in
a few cases, esp. in makefiles of course.
Cheers,
Ralf
Re: sed --posix does not catch incomplete arguments, Paolo Bonzini, 2010/06/11