From owner-freebsd-standards@FreeBSD.ORG Tue Jun 3 07:42:28 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E87D537B401 for ; Tue, 3 Jun 2003 07:42:28 -0700 (PDT) Received: from chiark.greenend.org.uk (chiark.greenend.org.uk [193.201.200.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F10A43FBD for ; Tue, 3 Jun 2003 07:42:25 -0700 (PDT) (envelope-from fanf@chiark.greenend.org.uk) Received: by chiark.greenend.org.uk (Debian Exim 3.35 #1) with local for freebsd-standards@freebsd.org id 19NCzZ-0001qc-00; Tue, 03 Jun 2003 15:42:25 +0100 Date: Tue, 3 Jun 2003 15:42:25 +0100 From: Tony Finch To: freebsd-standards@freebsd.org Message-ID: <20030603144225.GH18938@chiark.greenend.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i Sender: Tony Finch Subject: Sed substitution bugs X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2003 14:42:29 -0000 $ echo foo | sed 's/ */,/g' ,f,o,o $ On Solaris and Linux I get ,f,o,o, (which is what I expected). The following work correctly: $ echo | sed 's/ */,/g' , $ echo foo | sed 's/ *$/,/g' foo, $ Here's another (related) bug: $ echo foo | sed 's/ */,/1' ,foo $ echo foo | sed 's/ */,/2' ,foo $ echo foo | sed 's/ */,/3' ,foo $ echo foo | sed 's/ */,/4' ,foo $ echo foo | sed 's/ */,/5' ,foo $ Tony. -- f.a.n.finch http://dotat.at/ LUNDY FASTNET IRISH SEA: SOUTHEAST VEERING SOUTHWEST 5 TO 7, OCCASIONALLY GALE 8 AT FIRST, DECREASING 4 OR 5. RAIN. MODERATE OR GOOD.