sftp file upload problem

Hi All,

I am trying to upload a text file from HP unix to Windows tectia server using sftp, the text file shows with new line character after upload.

For EG : abc.txt file contains

123
456

aftre upload it shows as

123 456

i am using sftp version 2.0

TQ,

So, when you upload the file, which in initial state has UNIX end of line, the file gets Windows end of line when you open it ? I think the server, SSHD Tectia, assumes that the file will be opened under Windows and automatically adds windows end-of-line. If that's not the case, the server doesn't correctly handles the CR-LF. As as last resort, you can use some windows utility to make Dos2Unix conversion.

Thanks for your reply, it works with ux2dos in hp unix, but for this i need to add this step in my script to convert the file before uploading, is there any way to handle it like in ftp we can use either ascii or bin command.

However it works now withe ux2dos.

TQ

Hi,

By using ux2dos the file has been successfully converted into dos format but at the end it also added one special character i think that is also a new line character, any idea how can it be removed automatically?

TQ

Hi

I have checked the file in HP Unix after converting into ux2dos and found that all the text as ^M at the end of the text and finally it marked ^Z at the end of the file, this is appending the special character when I have opened it in Windows system.
How to delete this ^Z at the end automatically?

TQ,
Phani