Re: EMC cvs files...




thanks for the info and ideas, originally I created a zip file and
ftped to my linux box, unfortunately this has the side effect that text
files are now in dos format, which can be solved easy, too bad I did
not think of that before.

What I ended up doing was to manually ftp all files, creating the
directory structure myself, it was a pain, wont ever take that path
again.

Also had the problem how to restore file permision on shell scripts
which are lost during the manual ftp, dont know if that zip files would
keep them. 

in order to resolve both problems first I took on the dos format issue,
there is an extra carriage return ^M at the end of the line on every
text file, I guess this problem is due to binary mode option to send
files over ftp.  here is a small dirty fix...

       for file in $(find . -type f )
       do
        sed -e 's/^M$//' $file > ${file}.tmp
        mv ${file}.tmp $file
       done

Note: the ^M sequence comes from typing .. ctrl-v followed by crtl-M

 next, in order to restore execute permision on files requiring it,
either you can assign it to all, the ones not needing it would not be
harmed or you can get fancy using.....

	for file in $(find . -type f | xargs file | awk '{print $1}' )
	do
        chmod a+rx ${file%:}
	done

assuming you are using bash.

thanks anyway.  =)...

esv.


__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/



Date Index | Thread Index | Back to archive index | Back to Mailing List Page

Problems or questions? Contact