LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 04-08-2005, 01:10 AM   #1
rebel
LQ Newbie
 
Registered: Aug 2003
Distribution: CentOS
Posts: 24

Rep: Reputation: 15
Lightbulb 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
 
Old 04-08-2005, 01:51 AM   #2
herbc
Member
 
Registered: May 2004
Location: United States
Distribution: Slackware 10.0
Posts: 72

Rep: Reputation: 15
man fromdos
 
Old 04-08-2005, 11:37 AM   #3
rebel
LQ Newbie
 
Registered: Aug 2003
Distribution: CentOS
Posts: 24

Original Poster
Rep: Reputation: 15
Question

Thanks. And where do I get "fromdos"?
 
Old 04-08-2005, 08:35 PM   #4
herbc
Member
 
Registered: May 2004
Location: United States
Distribution: Slackware 10.0
Posts: 72

Rep: Reputation: 15
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/
 
Old 04-12-2005, 03:27 PM   #5
cowboy_jake
Member
 
Registered: Apr 2005
Location: Texas
Distribution: RHEL 2.1,3.0,4.0
Posts: 39

Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding carriage returns Zxarr Programming 7 09-20-2005 06:44 AM
Carriage Returns Thorkyl Linux - Software 7 06-28-2004 06:42 PM
XDrawString and carriage returns jpbarto Programming 1 03-25-2004 04:07 PM
Kword: How to remove carriage returns? RockyRed Linux - Newbie 1 07-21-2003 07:52 AM
Carriage Returns Trouble sancho5 Linux - General 2 08-29-2001 09:59 PM


All times are GMT -5. The time now is 07:56 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration