Dear Zazzybob,
thanks so much for the information, but i am so new to unix, and I can't completely follow up with u. I need to understand the source of the problem, that is why the sort command is adding a new line at the end of the file.
and when i execute the command : gunzip -c file.gz |tail -1 , the result is the last two lines, not the last line only.
Thanks

Unix files that us humans consider text, use ASCII 10 for carriage control - it's called a newline character.

Unzip the file.
Open the file in an editor, go to the end of the very last line and hit the return key on the keyboard. That will add a newline (\n) to the end of the file. Save the changed file. Re-zip it.