can I use the commend vi -r filename at this moment?
Main Topics
Browse All TopicsHi, all experts
I received an error message 'incomplete last line' through VI editor. all original lines look like miscoded, I don't know how should I fix it? it's my first time to encounter this issue.
Thank you in advance
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Let's review I had done before I got the error message:
1. I modfied few lines which located in bottom of the ksh file
2: I quit vi with :x
3.After a while, when I went back to vi editor, the error message appeared and asked me to hit Return to continue. I saw all original lines miscoded after I hit the enter key.
Then I find now where to modify the file any more.
hi, I did echo, and vi file again. Here is the results as what I always saw:
// first line is my vi commend, then following line are return
vi archimedes_ftp_as.ksh
"archimedes_ftp_as.ksh" 29 lines, 7745 characters (45 null)
\220^V^W\323^[^Y}\250f\217
0z\262\221yU:\223^^\267\30
1\320\300O\337:\343xTj\330
3*^A\340\376\344^A\373\372
\371\274\241H\373\205\315\
2+Z\257M\272 \322\321|ps^U=\247P m&^F^Ei\357\235\354a\350k^
377^V]\253^S\306\262\260\2
\340\214^G\302\331-\342y)9
=\217\337\207tU\227\203\20
234\307\227
\250'\3273\244Ve\202iO=\30
\301l^X\263{<A^C^Y\304=\20
312\210^G\226\367\304^C<\2
16l\350\313J.0X\336kw\267?
3\310a\376O\227\310w#\350\
270^Lb\370^]\253L\326\241\
6\370\367Bk\246\264\317\33
0~^E\351\265\264^X3\254\22
s\257\221\226E$\334@=^V\33
@
@
@
@
"archimedes_ftp_as.ksh" 29 lines, 7745 characters (45 null)
Business Accounts
Answer for Membership
by: Binary1Posted on 2007-09-14 at 10:41:45ID: 19893590
This may be caused by not having an end-of-line on the last line of the file. One way this can happen is if the file is created in windows and then opened in vi on Unix. I don't know how your original file was created but this may be the problem.
An easy way to fix it is to just save the file after opening it in vi. When you open the file again you won't get this message.