I have a large binary file (nearly binary file !) which has many \r\n
in it [ gets Generated in windows env and doesn't have controle over generating application ]. I want to remove \r from this big file [ =~ 1Gb ] to do further processing in another legacy app that shouts at \r
's
Is there any easy way to do it the unix way?
\r\n
s visible? It's easy to process a text file and change those up, but if you are really looking at a binary application that is quite different. What "further processing" do you have in mind? If this is a compiled binary you can't just muck around in the binary stuff, if it's not actually binary then the question is just how to change line feed types in a text file. – Caleb Jun 30 '11 at 10:34sponge
,perl -ip
and friends still write a new file then replace the original below the hood. See Is there a way to modify a file in-place? for how to truly act on the existing file directly. – Gilles 'SO- stop being evil' Jun 30 '11 at 20:52