Re: sed numbered fields don't start from parenthesis

Eric Blake <[email protected]> Wed, 05 Nov 2014 17:02:08 +0100
Newsgroups gmane.comp.gnu.utils.bugs
Organization Red Hat, Inc.
Message-ID <[email protected]>
On 11/02/2014 01:32 AM, blind Pete wrote:

>> Sorry, but the behavior you see is mandated by POSIX, and not a bug.
> 
> I was completely wrong.  
> 
> Could the man pages me made more obvious by adding a line like, 
> "Note: only matched sections are processed, others are passed though
> unchanged.".  

Where in the man page are you proposing adding it?  But I already see
this in 'man sed':


       s/regexp/replacement/
              Attempt  to match regexp against the pattern space.  If
success‐
              ful,  replace  that  portion  matched  with  replacement.

where the "replace that portion matched" implies that the portion not
matched is preserved unchanged.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc (application/pgp-signature, 539 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg

iQEcBAEBCAAGBQJUWkoAAAoJEKeha0olJ0Nq2rkH/ja/rUmL7okga2nV1jM4PgMG
K/4kpAz8EjdjBGKYtOhEjjBiFLctDlXJWa9/dlY/PnaeAWijMhqXSt/huvT4tLO7
VOrg1g050QLAhWhpmElbPmB2P9lUx6VHXJGnHu3KG65NFxM/SK++jH3CCrxfdFUU
b8AgDJ9xd1U4+xXBz8pzdX0Rnm7I/33bDN1drHGksl5Ris22F+TjrSeBi+SHz1hC
uk+Ca6P4faylALAvOX5Vmh0uxEycj9GFZDYn12e2gTLnIhS+90hvUjD3JE2RZk7B
B8IESdc2EgsBDfU/KNj+e8E73pHzm6KqHZ4zbWBClr1bHgLxrrjR0mWxFvuw4w4=
=dx4I
-----END PGP SIGNATURE-----