Subject: Re: Help with Win -> NetBSD text files...
To: Christos Zoulas <christos@zoulas.com>
From: Eric Fox <eric@fox.phoenix.az.us>
List: netbsd-help
Date: 03/20/2001 07:28:27
(chuckle)
That's a much more elegant method.
/\---/\ Eric J Fox
/ o o \ http://fox.phoenix.az.us
\.\ /./ ---------------------------
\@/ "Of course it runs NetBSD."
On Tue, 20 Mar 2001, Christos Zoulas wrote:
> In article <Pine.NEB.4.21.0103191958010.9623-300000@star.fox.phoenix.az.us>,
> Eric Fox <eric@fox.phoenix.az.us> wrote:
> >-=-=-=-=-=-
> >
> >#!/bin/sh
> >
> >CRLF=`/usr/bin/printf "\015"`
> >TMP=/tmp/dedos.$$
> >
> >cat $1 | sed "s/${CRLF}//g" >$TMP
> >cat $TMP >$1
> >rm -f $TMP
>
> #!/bin/sh
> for i
> do
> tr -d '\015' < $i > /tmp/$0.$$ && mv /tmp/$0.$$ $i
> done
>
> >-=-=-=-=-=-
> >#!/bin/sh
> >
> >CRLF=`/usr/bin/printf "\015"`
> >TMP=/tmp/dodos.$$
> >
> >cat $1 | sed "s/$/${CRLF}/g" >$TMP
> >cat $TMP >$1
> >rm -f $TMP
>
> #!/bin/sh
> for i
> do
> awk '{ printf("%s\r\n", $0); }' < $i > /tmp/$0.$$ && mv /tmp/$0.$$ $i
> done
>