Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f1CK5lx51217 for ; Mon, 12 Feb 2001 15:05:47 -0500 (EST) (envelope-from pgsql-general-owner@postgresql.org) Received: from mta4-rme.xtra.co.nz (mta4-rme.xtra.co.nz [203.96.92.15]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f17MNQx10210; Wed, 7 Feb 2001 17:23:27 -0500 (EST) (envelope-from csawtell@xtra.co.nz) Received: from berty ([210.55.86.44]) by mta4-rme.xtra.co.nz with SMTP id <20010207222327.OUWY10378016.mta4-rme.xtra.co.nz@berty>; Thu, 8 Feb 2001 11:23:27 +1300 Content-Type: text/plain; charset="iso-8859-1" From: Christopher Sawtell Organization: At Home To: Brice Ruth , Tom Lane Subject: Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference? Date: Thu, 8 Feb 2001 11:00:42 +1300 X-Mailer: KMail [version 1.2] Cc: Michael Fork , Ian Harding , pgsql-general@postgresql.org, pgsql-sql@postgresql.org References: <28516.981562472@sss.pgh.pa.us> <3A817A1F.8544A75C@webprojkt.com> In-Reply-To: <3A817A1F.8544A75C@webprojkt.com> MIME-Version: 1.0 Message-Id: <01020811004200.00373@berty> Content-Transfer-Encoding: 8bit X-Archive-Number: 200102/536 X-Sequence-Number: 4414 On Thu, 08 Feb 2001 05:38, Brice Ruth wrote: > Is there a simple (unix) command I can run on text files to convert > cr/lf to lf? The way I did it seemed pretty ass-backward to me (not to > mention time consuming). This little heiroglyph will convert all text files rescued from that man's system in a single directory to the format required by the one true way. for f in `echo *`; # Change this to select files by regex if needed do echo $f; cat $f | tr -d "\015\032" > $f.unix; mv $f.unix $f; done Don't forget to remove the control Z file terminator as well as the superfluous CRs. It could cause very obtuse problems. Assumes you have write permission to the directory.