From owner-freebsd-questions@FreeBSD.ORG Fri Jul 12 10:13:14 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 87437BCD for ; Fri, 12 Jul 2013 10:13:14 +0000 (UTC) (envelope-from ftp51246-2575596@sh4-5.1blu.de) Received: from sh4-5.1blu.de (sh4-5.1blu.de [178.254.11.41]) by mx1.freebsd.org (Postfix) with ESMTP id 548931B88 for ; Fri, 12 Jul 2013 10:13:14 +0000 (UTC) Received: from ftp51246-2575596 by sh4-5.1blu.de with local (Exim 4.69) (envelope-from ) id 1UxZGm-0002fN-RF for freebsd-questions@freebsd.org; Fri, 12 Jul 2013 11:04:04 +0200 Date: Fri, 12 Jul 2013 11:04:04 +0200 From: Matthias Apitz To: freebsd-questions@freebsd.org Subject: sed Guru wanted Message-ID: <20130712090404.GA9263@sh4-5.1blu.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 7.0-RELEASE (i386) User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Matthias Apitz List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jul 2013 10:13:14 -0000 Hello, I can delete in a text file with sed '/pattern1/,/pattern2/d' < file all lines between the lines with the given patterns, including themself also; how could I specify that the deletion should exclude the line with /pattern1/, i.e. the addr is something like /pattern1/+1 ? Thx matthias -- Matthias Apitz | /"\ ASCII Ribbon Campaign: www.asciiribbon.org E-mail: guru@unixarea.de | \ / - No HTML/RTF in E-mail WWW: http://www.unixarea.de/ | X - No proprietary attachments phone: +49-170-4527211 | / \ - Respect for open standards