Hello Timothy,
If you wanted to do it the perl way, which can be more then one way.
Type in the below code.
#!/usr/bin/perl -i
while (<>) {
/\n/g;;
print $_;
}
Regards,
Jaimee
p.s Yes there is a utility called dos2unix you use it in perl also by typing
$cformat = `dos2unix $filename $filename`;
or use it as a standalone at the command line by typing
dos2unix inputfile outputfile
-----Original Message-----
From: Timothy Johnson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 17, 2002 1:56 PM
To: 'John W. Krahn'; [EMAIL PROTECTED]
Subject: RE: control characters and other entities
Isn't there a utility called dos2unix or something like that that comes with
linux?
-----Original Message-----
From: John W. Krahn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 17, 2002 2:02 PM
To: [EMAIL PROTECTED]
Subject: Re: control characters and other entities
Jon Howe wrote:
>
> I am currently ripping apart some text files on my
> linux box that where created on windows
>
> I am having a problem with things like ^M appearing
> where I would expect \n and ~S where there should be a ' .
> I can remove ^M with :
>
> s/\cM\n/\n/g;
>
> I assume this is some sort of char encoding problem
> can some advise on the best way to deal with this.
Have a look at this program:
http://www.fourmilab.ch/webtools/demoroniser/
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]