On Thursday 06 December 2007 15:42, Randal Jarrett wrote:
> I'm looking for either a utility or simple script (bash/perl) to
> convert text files from linux (lf) format to dos (cr/lf).
>
> I need to move over 10k files and maintain the directory
> structure while doing it. A lot of the files and some of the
> directories have spaces in the name. I can process them on my system
> and then move them to the win server. I also have to maintain the
> original files & structure.
>
> Any and all assistance is appreciated.
Does telling you to never, ever use Windows count as assistance? No
matter, I use it too...
Anyway, here are some of the elements you have to work with:
- The "find" command
It has an option ("-print0") to print file names with NUL termination
instead of the usual newline termination.
- The "xargs" command
It has an option ("-0"), a counterpart to find's -print0, that makes
it read file names with NUL termination
- The "unix2dos" command
This does the basic text file format conversion.
Check 'em out.
> --
> Randal Jarrett <[EMAIL PROTECTED]>
Dude! Do you know you spell your name wrong??
Randall Schulz
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]