Solved

vi problem ... very urgent !!!

Posted on 1998-09-01
7
1,113 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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 …
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
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 navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

930 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

10 Experts available now in Live!

Get 1:1 Help Now