On Wed, 20 Feb 2013, Matthias Buecher / Germany wrote:
I tested on Debian 6.0 Squeeze and on Sourceforge Redhat server.
Just installed FreeBSD 9.0 in a VM and sed on FreeBSD needs a
semicolon to separate last command and closing bracket.
Semicolon might often work, but the portable syntax requires a newline.
See
<http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html>,
which includes:
The <right-brace> shall be preceded by a <newline> and can be
preceded or followed by <blank> characters.
and:
Historically, the sed ! and } editing commands did not permit
multiple commands on a single line using a <semicolon> as a
command delimiter. Implementations are permitted, but not
required, to support this extension.
--apb (Alan Barrett)