From owner-freebsd-bugs@FreeBSD.ORG Mon May 2 04:20:08 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EC0D1065673 for ; Mon, 2 May 2011 04:20:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D18038FC1A for ; Mon, 2 May 2011 04:20:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p424K7sF055684 for ; Mon, 2 May 2011 04:20:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p424K7Ve055683; Mon, 2 May 2011 04:20:07 GMT (envelope-from gnats) Date: Mon, 2 May 2011 04:20:07 GMT Message-Id: <201105020420.p424K7Ve055683@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Federico Sanchez Pinzon Cc: Subject: Re: misc/156758: sed utility extrange behavior with s/../& /g command on a .hex file X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Federico Sanchez Pinzon List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 04:20:08 -0000 The following reply was made to PR bin/156758; it has been noted by GNATS. From: Federico Sanchez Pinzon To: Yuri Pankov Cc: bug-followup@freebsd.org Subject: Re: misc/156758: sed utility extrange behavior with s/../& /g command on a .hex file Date: Mon, 2 May 2011 00:52:32 -0300 --20cf303f6a5600eb5f04a242f4b2 Content-Type: text/plain; charset=ISO-8859-1 SORRY! I think it was my mistake :( there was a \r that I was not expecting in the output of a GNU utility (obj-dump) Striping the \r with 'tr' solved the issue. Thks anyway, and sorry for wasting your time. 2011/5/1 Yuri Pankov > Can't reproduce it on 8.2 with either sed or gsed: > > $ /usr/bin/sed -e 's/../& /g' test > :1 00 00 00 01 8F 09 FE 51 8F 09 FE 51 8F 09 FE 51 8F 09 FE 5C 0 > :1 00 01 00 01 8F 09 FE 50 00 0A 0E 1F 0F F1 FE 51 4F 09 FE 55 8 > $ /usr/local/bin/gsed -e 's/../& /g' test > :1 00 00 00 01 8F 09 FE 51 8F 09 FE 51 8F 09 FE 51 8F 09 FE 5C 0 > :1 00 01 00 01 8F 09 FE 50 00 0A 0E 1F 0F F1 FE 51 4F 09 FE 55 8 > > Probably something is stripping : at the start of the line in your > environment? > > > Yuri > --20cf303f6a5600eb5f04a242f4b2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable SORRY!
I think it was my mistake :( there was a \r that I was not expect= ing in the output of a GNU utility (obj-dump)
Striping the \r with '= ;tr' solved the issue. Thks anyway, and sorry for wasting your time.
2011/5/1 Yuri Pankov <<= a href=3D"mailto:yuri.pankov@gmail.com">yuri.pankov@gmail.com>
Can't reproduce it on 8.2 with either sed or gsed:

$ /usr/bin/sed -e 's/../& /g' test
:1 00 00 00 01 8F 09 FE 51 8F 09 FE 51 8F 09 FE 51 8F 09 FE 5C 0
:1 00 01 00 01 8F 09 FE 50 00 0A 0E 1F 0F F1 FE 51 4F 09 FE 55 8
$ /usr/local/bin/gsed -e 's/../& /g' test
:1 00 00 00 01 8F 09 FE 51 8F 09 FE 51 8F 09 FE 51 8F 09 FE 5C 0
:1 00 01 00 01 8F 09 FE 50 00 0A 0E 1F 0F F1 FE 51 4F 09 FE 55 8

Probably something is stripping : at the start of the line in your
environment?


Yuri

--20cf303f6a5600eb5f04a242f4b2--