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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not understanding values returned when "ctrl g" a file using VI.

Status
Not open for further replies.

Geek8

Programmer
Joined
Apr 23, 2003
Messages
31
Location
US
This is a pretty simple question, but one that I can't seem to find a quick answer for. So I thought maybe someone on this board might be able to help me out. Basically I am using VI to look at a file with 10 records in it. With my cursor on the last character of the record, I hit the "ctrl g" command and get some info on the file. Can someone help me with the last part of the info? Basically when it says "col 2691-2726" what does that mean? I know the 2691 is the record length, but what is the 2726? Does that mean spaces past the record? Here is an example of what I got when I hit that command:

"new_file.dat" line 10 of 10 --100%-- col 2691-2726


Any help would be great since we are tying to figure out why this record is not exactly 2691 in length. I just don't know what the second part of the col field means.

Thanks so much.

Geek
 
vi on what operating system? Is it vim on Linux perhaps?

Annihilannic.
 
Vi on Red Hat Linux.
 
col 2691-2726

2691 - It should be the keystroke times.
2726 - It should be the actual spaces length.

e.g.
#It is not a script!!
#if 1 tab space = 7 spaces

# type ctrl g at position 2, you can see "3-9"
1[tab]2

3 is your keystroke of "l"(right moving)
9 is the actual spaces. 1+7+1

tikual
 
You can try this when in vi:
Code:
:set list

Hope This Help
PH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top