I am very sure this a dumb question to many, but from my view its worth asking.
When I do a vi on a file, on the right bottom side I am seeing something like below:
which tells me that I am on line 27 (which is the first number before the comma, i would like to know what are the numbers after comma in this case (16-24) denote ? the last percent number is the amount of file I have viewed, I think.
can any one tell me what that middle numbers with a dash in between denote.
Thanks
Last edited by babyPen1985; 09-05-2014 at 12:14 PM..
Reason: typed the side wrong
What you show seems not to be a plain "vi", because it wouldn't have such a display. You probably mean "vim", which is a popular (but not really compatible) vi-look-alike mostly used in Linux-systems.
Could you please clarify what exactly system you are on and which vi (-clone) you are using? To find this out you can (among others) use the following commands:
What you show seems not to be a plain "vi", because it wouldn't have such a display. You probably mean "vim", which is a popular (but not really compatible) vi-look-alike mostly used in Linux-systems.
Could you please clarify what exactly system you are on and which vi (-clone) you are using? To find this out you can (among others) use the following commands:
I hope this helps.
bakunin
Thanks Bakunin, here is the information you have asked for:
system:
From:
VI version:
which vi --> vi=vim ---------- Post updated at 11:31 AM ---------- Previous update was at 11:11 AM ----------
Quote:
Originally Posted by gull04
Hi,
It is vim, not sure which version - there is a description of the display here.
Regards
Dave
Thanks for the link Dave, but I was still not able to find the exactly what it denotes. The link concentrates on how to enable the line number, which in my case is already on.
By exploring a little more it
line 12
4 is indicating the 4 character need to know what 8 is
a sample record from my file:
the above [4-8] comes when my cursur is right in front of '*050' when i move the cursor over on to 0 it will become [5-9] and when move it over on 5 it will become [6-10] so on an so forth.
hope this helps to understand what it is, its definitely not the width of the column.
Last edited by rbatte1; 09-08-2014 at 09:57 AM..
Reason: Added CODE tags to the many already included
Could you please indicate where on that page the OP can find an answer to his question?
Hello Scrutinizer,
I agree that link will not give the complete solution to the user but if user can go through the link properly he will find many options related to vi and it may clear user's some of the queries too. I am Sorry if I have broken a forum rule here.
Hi Folks,
I have opened a log file through Vi editor in putty itself and I was searching for a pattern in logs , let say 'ABCD'
/abcd
then I want to come out from vi editor, Please advise what is the command to come out from unix editor..! (1 Reply)
Hi! I'm trying to assign line numbers to each line of the file
for example consider the following..
The contents of the input file are
hello how are you?
I'm fine.
How about you?
I'm trying to get the following output..
1 hello how are you?
2 I'm fine.
3 How about you? ... (8 Replies)
I know if i use grep -n that the output will have the lines numbered but is there a way to grep the actually line number.
so like this
grep -n "one" /usr/dict/numbers
1:one
21:twenty-one
31:thirty-one
41:forty-one
51:fifty-one
61:sixty-one
71:seventy-one
81:eighty-one
91:ninety-one
... (1 Reply)
hi there ,
i m new to unix , i d like to ask how can a get only even numbered lines matches with the word i search from txt file
for example :
3461:1.D. The copyright laws of the place where you are located also govern
3471:1.E. Unless you have removed all references to Project... (17 Replies)
Hi all,
I have a file consisting of lines in such a format: separated by space and M1 EOS for fullstop (.) ]
e.g
M1 I
M1 have
M1 a
M1 file
M1 consisting
M1 of
M1 lines
M1 in
M1 such
M1 a
M1 format
M1 EOS
M2 This
M2 is
M3 an (4 Replies)
Hi i would like to add line numbers to end of each line in a file.
I am able to do it in the front of each line using sed, but not able to add at the end of the file.
Can anyone suggest
The following code adds line number to start of each line
sed = filename | sed 'N;s/\n/\t/'
how can i... (5 Replies)
Hello..
I have got one file ...
I want to add line numbers with space form starting to ending..
for example...if the file is
--------------------------
sand sorcd 2345 345
recds 234 234 5687
yeres 568 988 erfg4 67
--------------------------
I need the output
... (4 Replies)
Maybe this question is out there, but I searched and didnt see it.
To print my files I use
more filename | lpr -Pprinter
I would like to print my scripts with line numbers.
How do I do this? (2 Replies)