Solved

vi problem ... very urgent !!!

Posted on 1998-09-01
7
1,108 Views
Last Modified: 2013-12-27
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.
0
Comment
Question by:sganta
7 Comments
 
LVL 2

Expert Comment

by:kellyjj
Comment Utility
that is strange.  Can you open other files from dos??
0
 
LVL 3

Expert Comment

by:braveheart
Comment Utility
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?
0
 
LVL 4

Author Comment

by:sganta
Comment Utility
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.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 4

Author Comment

by:sganta
Comment Utility
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.
0
 
LVL 3

Accepted Solution

by:
braveheart earned 30 total points
Comment Utility
I have tried 4 different flavours of UNIX and can't cope with lines as long as 1960 characters on any of them.  I suspect that the reason for this is that you can not fit a single line on a whole 80x24 screen.  

Can you use an alternative editor such as "emacs" or "pico"?  If "vi" won't work you can forget "ed" and "ex".

Are you viewing the files or actually editing them?  If you are only viewing them will "more" work?  So long as you do not have to make changes interactively you could surely use "sed" or "(n)awk" to process each file, or even write a simple C program if the editing is automatic.

Have you considered editing the files on DOS with an editor like BRIEF?
0
 
LVL 1

Expert Comment

by:onestar
Comment Utility
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.
0
 

Expert Comment

by:bknowles
Comment Utility
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.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now