file transfer from windows to unix using ftp

Hi all,

I have a file in windows, example
a.txt
****
aaa
bbb
ccc
<empty line>

when i transfer this file to unix using ftp, and viewed the file
# vi a.txt
aaa
bbb
ccc
#
I dont get the empty line which i specified in that file in windows.
Please help me, which in unix environment, empty line feed is not supporting.

Regards
NG

Try to transfer the file in ascii mode

Did you transfer the file in ASCII or binary mode? Are you sure the final empty line is missing? You can check this by opening the file in vi and entering

:set list

in command mode. If there's a single '$' showing in the last line it's empty.

Which transfer mode do you use? Try to switch it!!!

Regards,
Albert

I tried using ASCII mode. But even though I'm not able to get that blank line

If we give two blank lines at the end of the file in windows, then we can able to get one blank line in unix.
It is like
For 2 Blank lines in windows , we get 1 blank line in unix
For 3 Blank lines in windows , we get 2 blank line in unix
For 4 Blank lines in windows , we get 3 blank line in unix........

Again, how do you check this? Some UNIX editors (including vi/vim) automatically append a newline to the last line, so this might be the reason why it's not showing. Example:

$ printf "Test" > test_noeol.txt
$ printf "Test\n" > test_eol.txt
$ printf "Test\n\n" > test_dbleol.txt
$ file test_*.txt
test_noeol.txt:  ASCII text, with no line terminators
test_eol.txt:    ASCII text
test_dbleol.txt: ASCII text
$ cat test_noeol.txt
Test$ cat test_eol.txt
Test
$ cat test_dbleol.txt
Test

$