Re: How to convert files

2007-03-25 Thread Jude DaShiell
A binary file usually starts out with a hex 1Ah character in the DOS world at least. Other clues will be many characters with values in the range of 90H-FFH inclusive. Unix has a file utility whose source code is available for examination and it's well worth the abundance of file format infor

Re: How to convert files

2007-02-16 Thread Luis Ariel Lecca
John, Its a linux project (There are libs, executables, scripts, txt, sources and objects.) about 90MB. I did checkout using a svn program under Win32 and when I took a look to sources and scripts on linux, all those files have CR/LF. John Hasler <[EMAIL PROTECTED]> escr

Re: How to convert files

2007-02-16 Thread John Hasler
Bob McGowan writes: > Given the original requirements, I'd agree that using 'file' would be a > problem, so I'd depend on 'flip' for determining the text/binary > question. That depends on what his "binary" files are, and on how important speed is. As the files he wants to convert are all "DOS" fi

Re: How to convert files

2007-02-16 Thread Bob McGowan
FuziOK wrote: John Hasler wrote: FuziOK writes: I'm not clear how to use command file to detect binaries. Use it to detect DOS files. From the man page: If the lines of a file are terminated by CR, CRLF, or NEL, instead of the Unix-standard LF, this will be reported. Or parse file's

Re: How to convert files

2007-02-16 Thread Luis Ariel Lecca
Fabian, Thanks for the info. I like use scripting but I prioritize the safe way. I think that find / flip is safe, clear, easy, dificult to make a mistake (few arg) and save time. Thanks, Luis "Fabian (Lists)" <[EMAIL PROTECTED]> escribió: Hi Luis, Luis Ariel Lecca wrote:

Re: How to convert files

2007-02-16 Thread FuziOK
John Hasler wrote: > FuziOK writes: > > I'm not clear how to use command file to detect binaries. > > Use it to detect DOS files. From the man page: > > If the lines of a file are terminated by CR, CRLF, or NEL, instead of > the Unix-standard LF, this will be reported. > > Or parse file's

Re: How to convert files

2007-02-16 Thread Fabian (Lists)
Hi Luis, Luis Ariel Lecca wrote: > Hi all, could any body give me a hand with this stuff ? > > Im trying to find a good way to convert dos files (CR-LF) to Unix files > (LF). [snip] Instead of installing an extra application you could cat your files through sed. >From http://www.student.

Re: How to convert files

2007-02-16 Thread John Hasler
FuziOK writes: > I'm not clear how to use command file to detect binaries. Use it to detect DOS files. From the man page: If the lines of a file are terminated by CR, CRLF, or NEL, instead of the Unix-standard LF, this will be reported. Or parse file's output for the identifier for your

Re: How to convert files

2007-02-16 Thread FuziOK
John Hasler wrote: > Luis Ariel Lecca writes: > > Im trying to find a good way to convert dos files (CR-LF) to Unix files > > (LF). This should be safe and recursive but it should not change any > > binary file. > > Write script using find to recurse, file to detect binaries, and dos2unix > to co

Re: How to convert files : Finished

2007-02-16 Thread Luis Ariel Lecca
FuziOK <[EMAIL PROTECTED]> escribió: find /somedir -type f -exec flip -u {} \; No extra filter is needed. Thanks FuziOK !, I guess its a very good way to do. Thanks to Greg and Matthew tor the sugestions. - Preguntá. Respondé. Descu

Re: How to convert files

2007-02-16 Thread John Hasler
Luis Ariel Lecca writes: > Im trying to find a good way to convert dos files (CR-LF) to Unix files > (LF). This should be safe and recursive but it should not change any > binary file. Write script using find to recurse, file to detect binaries, and dos2unix to convert text files. > The files ar

Re: How to convert files

2007-02-16 Thread FuziOK
Luis Ariel Lecca wrote: > > [EMAIL PROTECTED] escribió: > > > > "flip" works just great. I use it everyday. > > > >t will not do ANY binaries by default. You have to force it to do > >inaries. > > and recursively ? flip doesnt have this option. If use pipe betwen ls and > flip: Does flip detect

Re: How to convert files

2007-02-16 Thread Luis Ariel Lecca
> [EMAIL PROTECTED] escribió: > "flip" works just great. I use it everyday. > >t will not do ANY binaries by default. You have to force it to do >inaries. and recursively ? flip doesnt have this option. If use pipe betwen ls and flip: Does flip detect is a binary file or should do a filte

Re: How to convert files

2007-02-16 Thread Matthew K Poer
On Fri, 2007-02-16 at 10:11 -0300, Luis Ariel Lecca wrote: > Hi all, could any body give me a hand with this stuff ? > > Im trying to find a good way to convert dos files (CR-LF) to Unix > files (LF). > This should be safe and recursive but it should not change any binary > file. > The files aren

Re: How to convert files

2007-02-16 Thread Greg Folkert
On Fri, 2007-02-16 at 10:11 -0300, Luis Ariel Lecca wrote: > Hi all, could any body give me a hand with this stuff ? > > Im trying to find a good way to convert dos files (CR-LF) to Unix > files (LF). > This should be safe and recursive but it should not change any binary > file. > The files aren

How to convert files

2007-02-16 Thread Luis Ariel Lecca
Hi all, could any body give me a hand with this stuff ? Im trying to find a good way to convert dos files (CR-LF) to Unix files (LF). This should be safe and recursive but it should not change any binary file. The files arent large but there are millon. Should use flip to do it ?