[ale] Batch processing text files; I got it.
Randal Jarrett
rsj at radio.org
Fri Dec 7 15:05:13 EST 2007
I did a variation on this and got it to work.
I made the toplevel dir 'Dir2'
cd into Dir1 and the 'rsync -va . ../Dir2/
cd into Dir2
find . -type f -name "*.txt" -exec unix2dos "{}" \;
that did it. I didn't put the "" around the {} the first
time and it barfed on the files with spaces in them.
Thanks everybody for all the suggestions.
On Thu, 2007-12-06 at 22:29 -0800, Joe Bayes wrote:
> Jerry Yu writes:
>
> >dos2unix converts the file in-place, therefore the structure ( assume you
> >meant directory structure) is intact.
>
> But I thought he wanted the structure in a new location, not replacing
> the old one.
>
> I would do the following:
>
> mkdir converted
> tar cf - in |(cd converted ; tar xf -)
> cd converted
> find ./ -type f -exec unix2dos "{}" \;
>
> Joe
> --
> Joe Bayes -- jbayes at spoo.mminternet.com
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
--
Randal Jarrett <rsj at radio.org>
RSJ Consulting, Inc
Hernando, FL
(352) 419-0112
More information about the Ale
mailing list