From owner-freebsd-questions@FreeBSD.ORG Thu Apr 10 09:30:06 2003 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 E888F37B404 for ; Thu, 10 Apr 2003 09:30:06 -0700 (PDT) Received: from web21201.mail.yahoo.com (web21201.mail.yahoo.com [216.136.129.59]) by mx1.FreeBSD.org (Postfix) with SMTP id 2C1BD43FDF for ; Thu, 10 Apr 2003 09:30:02 -0700 (PDT) (envelope-from adriankok2000@yahoo.com.hk) Message-ID: <20030410163001.63667.qmail@web21201.mail.yahoo.com> Received: from [64.141.32.2] by web21201.mail.yahoo.com via HTTP; Fri, 11 Apr 2003 00:30:01 CST Date: Fri, 11 Apr 2003 00:30:01 +0800 (CST) From: =?iso-8859-1?q?adrian=20kok?= To: questions@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: sed to remove pattern ',' X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2003 16:30:07 -0000 hi all I have problem to replace the pattern ',' to | can you give me hint? tks data: 'peter','30 Woodroad, CA','USA' 'coral','110 Foreest','UK' to 'peter|30 Woodroad, CA|USA' 'coral|110 Foreest|UK' and I used the following but failed sed -e 's/\','/\|/g because output only replace all the pattern , to | not "," to | _______________________________________________________________________ Do You Yahoo!? Get your free @yahoo.com.hk address at http://mail.english.yahoo.com.hk