View Single Post
Old 10-18-2002, 11:58 AM  
XXXManager
So Fucking Banned
 
Join Date: Mar 2002
Location: Far out in the uncharted backwaters of the unfashionable end of the Western Spiral arm of the Galaxy
Posts: 893
hey HQ
No - SSH ftp can be ASCII as well. You can select that in the menues probably.
Anyway - the problem you have dont necessarily have to do with ASCII/BIN. It has to do with the difference in CRLF between Unix and Windows

To fix it - (assuming you have perl on your machine) do the following after uploading the files
1. Stand in the directory you uploaded the files to
2. Assuming your files are .pl, run the two commands below:
2.1 find . -type f -regex '.*\.pl' | xargs perl -pi -e 's:\r\n:\n:g'
2.2 find . -type f -regex '.*\.pl' | xargs perl -pi -e 's:\r:\n:g'
This changes all the fuckups you get for moving a file from windows editors to unix/linux

Note: if they are not .pl but .php just change the extention of the find.

CAUTION: those commands go over ALL files it find recursively (=including sub-dirs). Make sure you indeed want to change all the files from the point you are at, downward.

I found no better way to do this. Just write a small shell script that you will execute every time you have an update to the scripts.


Last edited by XXXManager; 10-18-2002 at 12:03 PM..
XXXManager is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote