From owner-freebsd-questions Tue Feb 24 19:14:58 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA15173 for freebsd-questions-outgoing; Tue, 24 Feb 1998 19:14:58 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from jaguar.ir.miami.edu (jaguar.ir.miami.edu [129.171.32.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA15016 for ; Tue, 24 Feb 1998 19:14:33 -0800 (PST) (envelope-from marcus@miami.edu) Received: from localhost by jaguar.ir.miami.edu (PMDF V5.1-10 #24029) with SMTP id <0EOW00H01ZO6D9@jaguar.ir.miami.edu> for freebsd-questions@FreeBSD.ORG; Tue, 24 Feb 1998 22:14:30 -0500 (EST) Date: Tue, 24 Feb 1998 22:14:30 -0500 (EST) From: "Joe \"Marcus\" Clarke" Subject: Re: unix2dos/dos2unix/fromdos/todos In-reply-to: To: Bryce Newall Cc: FreeBSD Questions List Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have two perl scripts that convert UNIX text to DOS text and vice versa. If that's what you want, here are the sources: dos2unix: #!/usr/local/bin/perl -pi # # Convert DOS text file to Unix file format. Conversion is done in-place. # # Usage: dos2unix dosfile ... print STDERR "Converting \"$ARGV\" ...\n" if (eof || ($. == 0)); s/\015$//; # strip ^M from end of line. s/\032$//; # strip ^Z if we see it (which'll be at EOF). unix2dos: #!/usr/local/bin/perl -pi # # Convert Unix text file to DOS file format. Conversion is done in-place. # # Usage: unix2dos unixfile ... print STDERR "Converting \"$ARGV\" ...\n" if (eof || ($. == 0)); s/$/\015/; # tack on ^M s/\n/\n\032/ if (eof); # DOS ^Z at end of file. On Tue, 24 Feb 1998, Bryce Newall wrote: > Greetings, > > I am looking for (preferably) source from which to compile the above > programs under FreeBSD, or possibly a site from where I might be able to > obtain binary versions for FreeBSD 2.2.5-STABLE. I've searched all over > the place and have turned up nothing. Any ideas where I might find this? > > Thanks in advance, > Bryce > > ********************************************************************** > * Bryce Newall * Email: data@dreamhaven.org * > * WWW: http://home.dreamhaven.org/~data * > * "Stop smirking, Number 1." -- J.L. Picard * > * "I'm a doctor, not a doorstop!" -- EMH Program, ST:FC * > ********************************************************************** > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message