X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 69ED8D1B4F2 for ; Mon, 15 Sep 2003 10:02:03 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 34319-02 for ; Mon, 15 Sep 2003 07:01:33 -0300 (ADT) Received: from anchor-post-30.mail.demon.net (anchor-post-30.mail.demon.net [194.217.242.88]) by svr1.postgresql.org (Postfix) with ESMTP id D4C1AD1B4F1 for ; Mon, 15 Sep 2003 07:01:25 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-30.mail.demon.net with esmtp (Exim 3.35 #1) id 19yqAh-0008PN-0U; Mon, 15 Sep 2003 11:01:27 +0100 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 6B5E5162AB; Mon, 15 Sep 2003 11:01:26 +0100 (BST) Received: from client17.archonet.com (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id CA20E1597A; Mon, 15 Sep 2003 11:01:25 +0100 (BST) From: Richard Huxton To: "Richard Sydney-Smith" , Subject: Re: Copy Command Error Date: Mon, 15 Sep 2003 11:01:24 +0100 User-Agent: KMail/1.5 References: <001601c37b67$608235e0$dd6d32d2@athlon2000> In-Reply-To: <001601c37b67$608235e0$dd6d32d2@athlon2000> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200309151101.24985.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/133 X-Sequence-Number: 15111 On Monday 15 September 2003 09:57, Richard Sydney-Smith wrote: > I am outputting the following rows from a SYBASE database on W2000 > The problem is that each string is imported with the inverted commas. > > eg field ID = ''RK'' instead of 'RK' > > Can someone please help? A short bit of perl. Something like (untested) perl -pi -e 's/\t"/\t/g' fcont.dat perl -pi -e 's/"\t/\t/g' fcont.dat That should pre-process the file. I'm sure someone else on the list will show how to do it in sed. Hmm - just noticed you are on Windows. Not sure what cygwin ships with, or whether you have perl installed. -- Richard Huxton Archonet Ltd