From owner-freebsd-questions@FreeBSD.ORG Thu Jan 29 08:22:48 2004 Return-Path: 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 99C1616A4CE for ; Thu, 29 Jan 2004 08:22:48 -0800 (PST) Received: from hotmail.com (law11-f24.law11.hotmail.com [64.4.17.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB59443D1F for ; Thu, 29 Jan 2004 08:22:45 -0800 (PST) (envelope-from weiwuzhang@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 29 Jan 2004 08:22:45 -0800 Received: from 211.98.230.113 by lw11fd.law11.hotmail.msn.com with HTTP; Thu, 29 Jan 2004 16:22:45 GMT X-Originating-IP: [211.98.230.113] X-Originating-Email: [weiwuzhang@hotmail.com] X-Sender: weiwuzhang@hotmail.com From: "Zhang Weiwu" To: dnelson@allantgroup.com Date: Fri, 30 Jan 2004 00:22:45 +0800 Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312; format=flowed Message-ID: X-OriginalArrivalTime: 29 Jan 2004 16:22:45.0459 (UTC) FILETIME=[20AA0230:01C3E684] cc: questions@freebsd.org Subject: Re: use \000 in sed X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: zhangweiwu@realss.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2004 16:22:48 -0000 Dan Nelson wrote: >I'm not sure that sed can process \123-style octal characters, since it >already uses the \ character for backreferences. Since you're only >replacing one letter, you can use tr: > >manpath | tr ':' '\000' | xargs -0 ls > oh Brilliant, i almost forgot this command! But once I need to work with complex replacement, do I have to use the two commands together? #cmd... | tr .... | sed ... _________________________________________________________________ 与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn