Solved

vi problem ... very urgent !!!

Posted on 1998-09-01
7
1,123 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
nodeip 9 80
UNiX Script filesystem space usage Part2 54 87
Martian Packets Unix 5 53
SCP a file to multiple machines using a script 4 46
Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

821 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