Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: schweng@astro.unibas.ch (Hans Schwengeler)
Subject: Re: dos 2 unix
Date: 1998/08/06	[thread overview]
Message-ID: <35c95b34.0@maser.urz.unibas.ch> (raw)
In-Reply-To: 35C73769.9BC50362@sandia.gov

In article <35C73769.9BC50362@sandia.gov>,
	Anji Morris <amorri@sandia.gov> 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
===============================================================================



  parent reply	other threads:[~1998-08-06  4:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-08-04  4:00 dos 2 unix Anji Morris
1998-08-04  4:00 ` Stephen Thompson
1998-08-04  4:00 ` Nick Manka
1998-08-04  4:00 ` Pat Gunn
1998-08-04  4:00   ` John Wilson
1998-08-08  4:00     ` Pat Gunn
1998-08-06  4:00 ` Hans Schwengeler [this message]
1998-08-07  4:00   ` dos 2 unix (Try "flip") Jeff Sullivan
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox