Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Removing Carriage returns from text files

by DamnDirtyApe (Curate)
on Oct 18, 2001 at 00:23 UTC ( [id://119551]=note: print w/replies, xml ) Need Help??


in reply to Removing Carriage returns from text files

Are you certain you can't do it on the Unix side? This works very nicely for me from a prompt in Linux:
$ cat dosfile.txt | col -b > unixfile.txt
Sorry I don't have a Perl solution any better than those given.

Replies are listed 'Best First'.
Re: Re: Removing Carriage returns from text files
by tommyw (Hermit) on Oct 18, 2001 at 03:23 UTC

    No, no, no, no, no!

    Cat a single file into a pipe is simple evil and wasteful. You meant to write:

    col -b < dosfile.txt > unixfile.txt

Re: Re: Removing Carriage returns from text files
by Kalimeister (Acolyte) on Oct 18, 2001 at 00:29 UTC
    Thanks for taking the time to answer my questions. Unfortunately the ftp'ing is all part of a script that our builds department runs to collect all the files it needs for a given build and they don't have the time to go through and search for all the .txt files and then make them unix. I guess we are stuck with the vb tool.
    This is the first Perl discussion group I have found and I must say I have been very impressed with the speedy and helpful responses! Thank you muchly.

    Kalimeister

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://119551]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2024-04-16 16:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found