From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 31 11:02:30 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3D7B816A407 for ; Sat, 31 Mar 2007 11:02:30 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.freebsd.org (Postfix) with ESMTP id E802913C4B0 for ; Sat, 31 Mar 2007 11:02:28 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.4) with ESMTP id l2VB2MlJ023646 for ; Sat, 31 Mar 2007 15:02:22 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.4/Submit) id l2VB2LMg023645 for hackers@freebsd.org; Sat, 31 Mar 2007 15:02:22 +0400 (MSD) (envelope-from yar) Date: Sat, 31 Mar 2007 15:02:21 +0400 From: Yar Tikhiy To: hackers@freebsd.org Message-ID: <20070331110221.GI98431@comp.chem.msu.su> References: <20070326135106.GG60831@comp.chem.msu.su> <460B76A0.5030200@aueb.gr> <20070330172133.GD98431@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070330172133.GD98431@comp.chem.msu.su> User-Agent: Mutt/1.5.9i Cc: Subject: Re: sed -i X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Mar 2007 11:02:30 -0000 On Fri, Mar 30, 2007 at 09:21:33PM +0400, Yar Tikhiy wrote: [...] > If we've started to delete the pattern space, we should print the > text in place of it because `c' is for `change'. BSD and GNU seds > have this bug, but Solaris sed doesn't have it. [...] By the way, I found myself w/o a Solaris account, but I was able to build Solaris sed in FreeBSD quickly from the OpenSolaris sources. All it took was downloading the following files: http://cvs.opensolaris.org/source/raw/onnv/onnv-gate/usr/src/ucbcmd/sed/sed.h http://cvs.opensolaris.org/source/raw/onnv/onnv-gate/usr/src/ucbcmd/sed/sed0.c http://cvs.opensolaris.org/source/raw/onnv/onnv-gate/usr/src/ucbcmd/sed/sed1.c http://cvs.opensolaris.org/source/raw/onnv/onnv-gate/usr/src/ucbhead/regexp.h and issuing this command: cc -I. -o sed sed*.c Voila! (Their regexp.h offers definitions of its functions, not just their prototypes, which made my task very easy.) Perhaps other basic tools from Solaris could be built in this way for the purpose of testing, too, in case one needs them but has no Solaris account at hand. Another $0.02 from yours truly. :-) -- Yar