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.
use a script as follows: #Description: Add CR to text files' for f do mv $f ${f}.orig && awk '{ printf "%s\r\n", $0 }' ${f}.orig >$f done reverse: # Description: Remove CR and control-Z from text files' for f do mv $f ${f}.orig && tr -d '\015\032' <${f}.orig >$f done rgds. Otto Rodusek -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org