Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

have a problem with vi , they cut subjets away

Status
Not open for further replies.

benlancelot

Technical User
Oct 13, 2003
3
DE
hallo ,

sorry when my english is bad.. i am from germany...

my problem is . i have a file that´s 1,4 mb big..
when i open it with vi .in the groundline stands line 60000 14222222 ( 842222 zero).. after the changes when i save with :wq! the file ist only 0,6 mb big.. and thats the problem... the size (the zeros)a away.. and the file dosen´t work anymore..

thanks for helping in future

ben
 
ben, how was this file created? Are you sure it is an ASCII text file? Is there anything unusual about the file (like maybe the line length exceeds vi's limit)?
 
If a file has NULL characters in it, like the one you're working with, vi will throw those characters away when it saves the file. You should use a different editor such as textedit.

Dennis
 
hallo ,


the file come from a program. it was a old month datafile.
where i can see what a file it is..??
i have look for a other editor .. but i dosen´t found someone on my system.. it was sco unix. have you a tip where i can find a better editor to change my file..

thanks for helping in future

ben
 
If the file came from a database, I suspect the only way you are going to be able to read it and change it in its current format is using that database.

If you want to access and edit the data that is in a particular table that is part of that datafile, you could probably download the data from the table to an ASCII text file (a flat file), edit it, and then upload it back to the table in the database.

which type of database is it?
 
hallo bi,

who can i see what a file is it. and what other editor is the right for other files as asciitextfiles.. can you give me the name or the downloadplace.


thanks

ben
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top