Re: Q: Mass Text convert Linux-DOS?
On Fri, Mar 30, 2001 at 08:07:43AM +0200, Jonathan Gift wrote:
> Hi,
>
> I have a great many text files I have to convert from Linux to DOS
> format. I tries recode by hand once but it took hours. There has to be an
> automatic way.
>
> I tried the following but it only acted on the top level of directories
> and not the files and subdirectories below. Any help greatly
> appreciated:
>
> ----- Snip -----
>
> for file in ~/documents; do
> recode latin1..ibmpc $file
> done
>
> ----- Snip -----
this'll preserve your original files under the new names
"*.unix", creating dos-like rc/lf line-endings in the new
instances...
perl -i.unix -pe 's:\n:\r\n:' * subdir*/*files*/*yada*
--
does a brain cell think?
will@serensoft.com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!
Reply to: