From owner-freebsd-questions Wed Mar 12 03:33:40 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id DAA04696 for questions-outgoing; Wed, 12 Mar 1997 03:33:40 -0800 (PST) Received: from iworks.InterWorks.org (deischen@iworks.interworks.org [128.255.18.10]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id DAA04691 for ; Wed, 12 Mar 1997 03:33:37 -0800 (PST) Received: (from deischen@localhost) by iworks.InterWorks.org (8.7.5/) id FAA01506; Wed, 12 Mar 1997 05:33:24 -0600 (CST) Message-Id: <199703121133.FAA01506@iworks.InterWorks.org> Date: Wed, 12 Mar 1997 05:33:24 -0600 (CST) From: "Daniel M. Eischen" To: jcs@dhi.dk, questions@freebsd.org Subject: Re: dos2ux Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > could anybody tell how to get rid of all the strange characters > which appear when I get a file from DOS. I work also in > a HP machine and there we have a command called dos2ux, > but we do not have it in FreeBSD. Go to the FreeBSD web page and search questions for "MS-DOS text files in UNIX". Here's one of the postings made by Gary Chrysler : -=-=-=-=-=-=-=-=- CUT unix2dos.pl #!/usr/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. -=-=-=-=-=-=-=-=- CUT unix2dos.pl -=-=-=-=-=-=-=-=- CUT dos2unix.pl #!/usr/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). -=-=-=-=-=-=-=-=- CUT dos2unix.pl here is a couple of perl scripts that I use! I forgot who wrote em, I sure do thank em! -Enjoy Gary ~~~~~~~~~~~~~~~ Improve America's Knowledge... Share yours The Borg... Where minds meet (207) 929-3848 Dan Eischen deischen@iworks.InterWorks.org