Date: Mon, 03 May 1999 15:50:29 -0400 (EDT) From: Seth <seth@freebie.dp.ny.frb.org> To: Vince Vielhaber <vev@michvhf.com> Cc: freebsd-stable@FreeBSD.ORG Subject: Re: Dos2unix Message-ID: <Pine.BSF.4.10.9905031547240.53751-100000@freebie.dp.ny.frb.org> In-Reply-To: <XFMail.990503154421.vev@michvhf.com>
next in thread | previous in thread | raw e-mail | index | archive | help
While this works in the majority of cases (I use the same command on occasion), it has the nasty side effect of stripping ALL ^M's, not just those occuring at EOL, and won't do anything about the ^Z's you get at the end of (some) DOS files. Sed can be used for this, as can perl (as people have pointed out). Not to start a war here, but perl just seems to me to be overkill for something as simple as this. SB On Mon, 3 May 1999, Vince Vielhaber wrote: > > This is all I use in a shell script to convert to unix. > > tr -d '^M' < $1 > > But change the ^M to an actual ASCII 13. I call it 2ux and to > use it: > > 2ux INFILE > OUTFILE > > I've never bothered converting them back, if needed I just load it into > an editor on the dos machine and save it, but you can probably use tr or > sed to do that if you really needed to. > > Vince. > -- > ========================================================================== > Vince Vielhaber -- KA8CSH email: vev@michvhf.com flame-mail: /dev/null > # include <std/disclaimers.h> TEAM-OS2 > Online Campground Directory http://www.camping-usa.com > Online Giftshop Superstore http://www.cloudninegifts.com > ========================================================================== > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-stable" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9905031547240.53751-100000>