From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,10af2d0eb2640809 X-Google-Attributes: gid1164f8,public From: schweng@astro.unibas.ch (Hans Schwengeler) Subject: Re: dos 2 unix Date: 1998/08/06 Message-ID: <35c95b34.0@maser.urz.unibas.ch>#1/1 X-Deja-AN: 378441225 References: <35C73769.9BC50362@sandia.gov> Content-Type: text/plain; charset=us-ascii X-Trace: 6 Aug 1998 09:28:52 +0100, 131.152.181.6 Mime-Version: 1.0 Newsgroups: comp.sys.dec In article <35C73769.9BC50362@sandia.gov>, Anji Morris writes: > Hi, > > I am running Digital Unix (OSF1 alf.sandia.gov V4.0 878 alpha). I > cannot seem to find a basic utility that comes with most installations > of unix to convert carriage return/line feeds to new lines (ie. dos2ux, > dos2unix, dtox). Any ideas? > > TIA, > > anji > > -- > Anji Morris/Unix Systems Admin > CSU Special Projects ,,, > amorri@sandia.gov (0 0) > -------------------------oOO--(_)--OOo------- > Sandia National Labs w 505/844-4082 > 1515 Eubank Blvd. SE f 505/844-9202 > Albuquerque, NM 87123_0745 > -------------------------- > > > Dear Anji, I found a small shell script which works in most cases: #! /bin/ksh # convert dos files to Unix by removing carriage returns. for f in $@ do tr -d '\015' <$f >${f}+ && mv -i $f ${f}~ && mv -i ${f}+ $f done Yours, hs. -- =============================================================================== Hans Schwengeler DECNET/SPAN: 20579::48130::SCHWENGELER Astronomical Institute INTERNET: schweng@astro.unibas.ch University of Basel schwengeler@urz.unibas.ch Venusstrasse 7 CH-4102 Binningen PHONE: +41 61 20 55 422 Switzerland FAX: +41 61 20 55 455 ===============================================================================