Solved

vi problem ... very urgent !!!

Posted on 1998-09-01
7
1,127 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
ID: 2006830
that is strange.  Can you open other files from dos??
0
 
LVL 3

Expert Comment

by:braveheart
ID: 2006831
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
ID: 2006832
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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 4

Author Comment

by:sganta
ID: 2006833
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
ID: 2006834
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
ID: 2006835
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
ID: 2006836
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

860 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