Hi All,
I am a newbie to UNIX shell scripting. Kindly help me in below requirement
i actually FTP a compressed file from UNIX to Windows server, while uncompressing the transfered file it actually contains a box character [] instead of a new line but i need it as a new line itself.
what can be done ? but the changes should be made only in this script and not in the Windows side.
Kindly help me..

What is a box character? [] is two characters and unix uses character 10 for a new line (\n), windows uses character 13 + character 10 for a line (\r\n).

What is a box character? [] is two characters and unix uses character 10 for a new line (\n), windows uses character 13 + character 10 for a line (\r\n).

A box character is one that Windows and other systems render as a box because that character does not have a glyph defined.

To the OP: you need to identify exactly which character is being mis-displayed (preferably to the decimal/octal/hex value). If you have shell access to the unix system, it should be fairly easy to examine the file to determine which character is bad ('od -c' is quite useful in visualizing the problem). Then, depending on the conversion needed, you can find a tool that will do the job. But first, you must properly characterize the problem.

> i actually FTP a compressed file from UNIX to Windows server
Did you use binary mode for the FTP transfer?

I am transferring the xmls from the UNIX to the Windows environment in Binary mode.

Hi Dude,

Before FTPing just convert file from unix to Dos and compress it
U can use below command
unix2dos file_name file_name

Let me know if it works and also can u tell me which command
u are using for FTP from unix to windows with example

This article has been dead for over six months. Start a new discussion instead.