From owner-freebsd-questions Thu Nov 7 13:13:10 2002 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 8BF9537B401 for ; Thu, 7 Nov 2002 13:13:09 -0800 (PST) Received: from the-frontier.org (ns1.the-frontier.org [216.86.199.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id A226D43E42 for ; Thu, 7 Nov 2002 13:13:08 -0800 (PST) (envelope-from pscott@skycoast.us) Received: from [192.168.66.249] (dhcp-249-66-168-192.the-frontier.org [192.168.66.249]) by the-frontier.org (8.9.3/8.9.3) with ESMTP id NAA98319; Thu, 7 Nov 2002 13:12:18 -0800 (PST) (envelope-from pscott@skycoast.us) User-Agent: Microsoft-Entourage/10.0.0.1309 Date: Thu, 07 Nov 2002 13:12:18 -0800 Subject: Re: stupid sed question From: "Paul A. Scott" To: Mathew Kanner , Message-ID: In-Reply-To: <20021107154625.A92742@cnd.mcgill.ca> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 11/7/02 12:46 PM, "Mathew Kanner" wrote: > What I would like is > echo abc | sed -e's,b,\n' to get > a > c A script of the form: echo abc | sed -e 's,b,\ ,' will work if the newline is escaped with a backslash and the remainder of the sed substitute is on the next line. If you run directly from the command line (not in a shell script) then you need two backslashes, the first one escapes the backslash for the interactive shell. Paul A. Scott mailto:pscott@skycoast.us http://skycoast.us/pscott/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message