From owner-freebsd-questions@FreeBSD.ORG Fri Oct 28 16:54:25 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 404E316A41F for ; Fri, 28 Oct 2005 16:54:25 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8EC143D46 for ; Fri, 28 Oct 2005 16:54:24 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j9SGsMZU089258; Fri, 28 Oct 2005 11:54:22 -0500 (CDT) (envelope-from dan) Date: Fri, 28 Oct 2005 11:54:22 -0500 From: Dan Nelson To: =?utf-8?B?S8O2dmVzZMOhbiBHw6Fib3I=?= Message-ID: <20051028165422.GA5513@dan.emsphone.com> References: <4362409D.400@t-hosting.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4362409D.400@t-hosting.hu> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.11 Cc: freebsd-questions@freebsd.org Subject: Re: Sed howto X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2005 16:54:25 -0000 In the last episode (Oct 28), Kvesdn Gbor said: > I'm looking for a good sed howto that can be useful for contributing > to ports collection. Replacing text is I'm especially interested in. > Besides, could somebody explain me, when we use USE_REINPLACE= YES > and ${REINPLACE_CMD}, and when we use just ${SED}? Our sed can only do inplace edits in 4.6 and newer, so on older systems the textproc/sed_inplace port gets installed and REINPLACE_CMD is set to that binary. Use ${REINPLACE_CMD} when you modify a file inplace, use ${SED} when you convert a "file.in" to a "file". -- Dan Nelson dnelson@allantgroup.com