Link to home
Start Free TrialLog in
Avatar of sganta
sganta

asked on

vi problem ... very urgent !!!

Hello experts !
I have small problem in UNIX.
Ours is SUN OS.
I have transferred DOS ASCII File to UNIX through FTP.

When I am trying to open that file

It is giving
INTERNAL ERROR :vredraw

What may be the problem ?
How do you solve it.
Please treat this as very urgent.
Thank you.
Avatar of kellyjj
kellyjj

that is strange.  Can you open other files from dos??
Have you set $TERM correctly?
What about line termination characters (although this should not cause a serious error - you'll only get a lot of extraneous <CR>s)?
Is the file very large, or is the longest line very long?
Avatar of sganta

ASKER

File is not very large.

But each line will contain 1960 characters.
Line size is very large. But I need to use. Because we are importing data from these
files. Other files are working fine. Earlier I have transferred  around 20 files, they
are working fine.

Thank you very much for your prompt response.
Avatar of sganta

ASKER

Hi !

TERM is set to vt100.

Earlier, it was working, I don't know, why it is happening. Is it because of the line size is
too long. But it was working before. I am afraid.
ASKER CERTIFIED SOLUTION
Avatar of braveheart
braveheart

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You could try to fold the file before you look at it.
fold filename > newfilename
vi newfilename

You can also set width using fold.

Make sure if you type echo $TERM you see VT100.
Read the man page for "tr".  There should be a description in there of how you can turn DOS-style "CR" into Unix-style "CR+LF".

In fact, under Solaris, I suspect there's a program called dos2unix (probably just a shell script that calls tr) and a complimentary program called unix2dos, and these programs should do everything you need.