Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
ftp to Unix
I am transferring data from a s/s to a Unix server using the 'save in'
feature Add/Modify FTP Location, but each line has ^M at the end of it. This is normally caused by the transfer protocol. Is this set in Microsoft or the Unix server? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
ftp to Unix
The ^M in dicates there is both a Carriage Retiurn and line feed at the end
of a line. Windows puts both the line feed and CR in the file while Unix only has CR. On most UNIX machines there are two commands unix2dos and dos2unix. Running dos2unix filename newfilename will fix the problem. "ng42" wrote: I am transferring data from a s/s to a Unix server using the 'save in' feature Add/Modify FTP Location, but each line has ^M at the end of it. This is normally caused by the transfer protocol. Is this set in Microsoft or the Unix server? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
ftp to Unix
With FTP diod you set it for Ascii or binary. try using Ascii transfer, this
will probably remove the Linefeed. Other methods are to use VI editor and removve last character in each row. vi filename type colon (:) to get in command mode. Then type the following 1,$s/.$// 1,$ is the address for doing every line in the file. $ is ast line in the file s/.$// the $ in this case is end of line. .$ is the last charactter on the line. s is the substitute command. Replaces last character on the line with nothing. You can also make a script using the SED editor. I don't remmber this sytax. "ng42" wrote: I am transferring data from a s/s to a Unix server using the 'save in' feature Add/Modify FTP Location, but each line has ^M at the end of it. This is normally caused by the transfer protocol. Is this set in Microsoft or the Unix server? |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
ftp to Unix
Hi Joel
Thanks for response. Is this a command that would have to be applied to every file transferred or can it be incorporated into a general setting. I will have multiple users saving many files so ideally it needs to be a setting. What is interesting is other clients of mine can do exactly this, i.e. save from Excel direct to the Unix server and the file remains true i.e. no ^M to be seen anywhere. What we cannot work out is what is different between the 2 organisations i.e. why it works there but fails here. "Joel" wrote: The ^M in dicates there is both a Carriage Retiurn and line feed at the end of a line. Windows puts both the line feed and CR in the file while Unix only has CR. On most UNIX machines there are two commands unix2dos and dos2unix. Running dos2unix filename newfilename will fix the problem. "ng42" wrote: I am transferring data from a s/s to a Unix server using the 'save in' feature Add/Modify FTP Location, but each line has ^M at the end of it. This is normally caused by the transfer protocol. Is this set in Microsoft or the Unix server? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Connect PC to UNIX via TCP/IP | Links and Linking in Excel | |||
Unix to Excel question | Excel Discussion (Misc queries) | |||
Unix Time Function | Excel Worksheet Functions | |||
Excel and Unix Question | Excel Worksheet Functions | |||
Unix Time in Excel | Excel Worksheet Functions |