Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

unix vi editor

Original Message
Name: indika_cha
Date: March 21, 2005 at 23:03:37 Pacific
Subject: unix vi editor
OS: windows xp
CPU/Ram: cyrex pro 96Mb
Comment:
I have a very large text file.
I tried to edit it using vi editor - unix
when i give " vi abc.txt "
it displays the file but at the last line it says "Line too long"
And i found that it cannot display the whole file. Only the upper part it display.

My friend, if you possible please help me.

Thank you.


Report Offensive Message For Removal


Response Number 1
Name: Dlonra
Date: March 22, 2005 at 13:48:58 Pacific
Subject: unix vi editor
Reply: (edit)
is your OS is "windows xp" what vi are you using?


Report Offensive Follow Up For Removal

Response Number 2
Name: gurubit
Date: March 23, 2005 at 03:00:09 Pacific
Subject: unix vi editor
Reply: (edit)
vi editor has a limitation of the number of characters in a line. If the line exceeds that, it will see the error message as "Line Too Long".

You can use cat command to open the file.
Changing the file contents of such file is a bit difficult.


Report Offensive Follow Up For Removal

Response Number 3
Name: Jim Boothe
Date: March 23, 2005 at 07:10:55 Pacific
Subject: unix vi editor
Reply: (edit)
sed can probably handle the long lines. To test this, pass the file through sed:

sed s/x/x/ filein > fileout

If you can identify your various:

oldpattern1 > newpattern1
oldpattern2 > newpattern2
etc

then this forum can help with a solution.


Report Offensive Follow Up For Removal

Response Number 4
Name: Dlonra
Date: March 23, 2005 at 07:32:19 Pacific
Subject: unix vi editor
Reply: (edit)
my recollection is that for non-Linux, the line length restriction applies to multiple utilities.

If a line is too long for vi, it will probably be too long for sed.


Report Offensive Follow Up For Removal

Response Number 5
Name: Jim Boothe
Date: March 23, 2005 at 10:50:59 Pacific
Subject: unix vi editor
Reply: (edit)
No, I have found sed to handle very long lines, which is why I recommended it as a possible solution.

Other commands can also handle the longer lines such as wc and diff, to name a couple.


Report Offensive Follow Up For Removal


Response Number 6
Name: Dlonra
Date: March 23, 2005 at 11:46:25 Pacific
Subject: unix vi editor
Reply: (edit)
Jim,
As I tried to note, the Linux flavored utilities have no or very long line length restrictions.

my original post almost said:
'if your OS is "windows xp" what vi are you using?'

r u sure your *nix utilities (ed, ex, vi ,sed, diff, etc.) are of the same flavor as chamil?



Report Offensive Follow Up For Removal

Response Number 7
Name: Jim Boothe
Date: March 23, 2005 at 13:02:16 Pacific
Subject: unix vi editor
Reply: (edit)
No, different platform. I could not say for sure, which is why I said that sed can PROBABLY handle the long lines.

You stated that, for non-Linux, if a line is too long for vi, it will probably be too long for sed.

But I do not find that correct for at least one non-Linux platform. On HP-UX, awk can handle lines up to about 2400 characters, and vi up to about 3000 characters I think, while sed can handle lines much longer than that.


Report Offensive Follow Up For Removal

Response Number 8
Name: Fooser
Date: April 27, 2005 at 06:34:24 Pacific
Subject: unix vi editor
Reply: (edit)
vi is limited at 4096 (sol.8) char per line. use command fold -w 4095 file > file.new to wrap the lines.


Report Offensive Follow Up For Removal



Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: unix vi editor

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software




XP Installed to G?

exessive internet traffic

ZoneAlarm Question. Blocked Connect

Windows Live Messenger Problem

Delete $Uninstall after SP3 updates


The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC