This widget could not be displayed.
1845515 Members
2213 Online
110244 Solutions
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
New Discussion
This widget could not be displayed.
This widget could not be displayed.

Re: line too long??

 
SOLVED
Go to solution
yoon
Occasional Contributor

line too long??

Hi..all!!

I can't log file..
when I opened the log file by vi, I got the message..."XXX Line too long"
Is there any limitation...A line can have characters???

how can I open the the file?
10 REPLIES 10
Mark Grant
Honored Contributor

Re: line too long??

Use "tail" or "cat" or a text editor that deosn't have this limitation. Check the thread a couple below this one too :)
Never preceed any demonstration with anything more predictive than "watch this"
Hoefnix
Honored Contributor

Re: line too long??

Hi,

didn't know vi had a limitation on number of chars in a line. It sounds to me that its not a ascii file?
Or can it be that there are some binary strings in it.

Check with: file
If it returns ASCII then use more or tail like Mark suggested.

HTH,
Peter
T G Manikandan
Honored Contributor

Re: line too long??

yoon
Occasional Contributor

Re: line too long??

thanks for your all reply...rapidly^^

but I want to know how can I open the file...by VI!!
why I can't edit or capture specific part in the file..that file is acsii text log file..

How many chars does A line have?? (limit..^^) and How Can extend that limit..??

Mark Grant
Honored Contributor
Solution

Re: line too long??

There is no limit on line length in a file. Some applications have a limit though and "vi" is one of them. Check out "vim" as mentioned above. It is a "vi" clone with added features "vim=vi improved"
Never preceed any demonstration with anything more predictive than "watch this"
Elmar P. Kolkman
Honored Contributor

Re: line too long??

Or run fold on the file before opening it with vi.
Every problem has at least one solution. Only some solutions are harder to find.
T G Manikandan
Honored Contributor

Re: line too long??

2048 is the limit on a single line
If you are using 11.11 then you can use this patch PHCO_27057 to make it 4096

Ariadne_2
New Member

Re: line too long??

Hi everybody --

I am trying to chop out the file part of a file by piping a head and tail command together. An example is:

head -213 test.txt | tail -42 > test2.txt

to grab lines 171-213 of a file.

The problem is, my command sometimes returns only partial lines (the last line is truncated).

Do you all suppose this is a similar limitation of head or tail? Why are my lines being truncated? Is there a workaround? I don't throw a "line too long" error, but this sounds like it might be the problem.

Thanks much!!
H.Merijn Brand (procura
Honored Contributor

Re: line too long??

You should have opened your own thread for new questions, but it's much easier:

# perl -ne'171..213 and print' test.txt

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Ariadne_2
New Member

Re: line too long??

So sorry, I thought that since this might have been related that I should stick it here.

Thanks for the perl tip -- worked like a charm. Cheers!!