LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (http://www.linuxquestions.org/questions/red-hat-31/)
-   -   How to remove carriage returns in a bunch of perl scripts? (http://www.linuxquestions.org/questions/red-hat-31/how-to-remove-carriage-returns-in-a-bunch-of-perl-scripts-310954/)

rebel 04-08-2005 12:10 AM

How to remove carriage returns in a bunch of perl scripts?
 
Hello,

What is the fastest way to remove MS-DOS carriage return in a bunch of perl scripts?

Alternatively, is it possible to make Perl scripts executable even if it contains MS-DOS carriage return?

Many thanks in advance.





* For Reference: http://www.linuxquestions.org/questi...hreadid=310953

herbc 04-08-2005 12:51 AM

man fromdos

rebel 04-08-2005 10:37 AM

Thanks. And where do I get "fromdos"?

herbc 04-08-2005 07:35 PM

came with my install of Slackware 10.0. if 'man fromdos' worked it should be available. If not, check out

http://www.thefreecountry.com/tofrodos/

cowboy_jake 04-12-2005 02:27 PM

Are you just trying to get rid of the ^M characters? If so, try one of these...

dos2unix [filename]
cat filename.dos | tr -d '\015' > filename.unix
col -bx < filename.dos > filename.unix

-Jake


All times are GMT -5. The time now is 08:27 AM.