Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
VI line number
Name: jb60606 Date: July 24, 2006 at 12:27:52 Pacific OS: Sun Solaris 10 CPU/Ram: Opteron Product: Sun
Comment:
No, this isn't about applying line numbering to the left margin of VI.
I recall being able to get a simple line number, at the bottom of my vi editor, that told me which line I was presently working on.
Is there any way to re-activate that feature, or was it only native to older releases...
Name: Vertabreaker Date: July 25, 2006 at 08:01:14 Pacific
Reply:
Hi,
Did you try CTRL-G?
~Regards
Verta
0
Response Number 2
Name: jb60606 Date: July 25, 2006 at 08:49:48 Pacific
Reply:
eh, that's handy, though not quite the same thing.
Anyways, I just discovered it's standard on all of our Linux boxes. In the lower right hand corner of the vi window, it tells you the exact line & character number you're on.
0
Response Number 3
Name: Vertabreaker Date: July 25, 2006 at 08:51:48 Pacific
Reply:
Cool. Glad ya found it :)
0
Response Number 4
Name: jb60606 Date: July 25, 2006 at 11:04:15 Pacific
Reply:
thanks. Just wish there was a way to get it on our solaris 10 boxes.
0
Response Number 5
Name: lchi2000g Date: July 25, 2006 at 11:25:11 Pacific
Reply:
If you do the following on Linux:
$ type vi vi is aliased to `vim'
vim will display the cursor line # you want, but /bin/vi will not.
vim can be downloaded from http://www.vim.org/download.php.
(The alias on linux is defined in /etc/profile.d/*, like vim.sh, vim.csh)
Summary: I am attempting to find a particualr line in a file and then replace it. Unfortunatly i can only guaruntee the content of the line prior to the one i am trying to edit. I have used grep -n and a cut...
Summary: Hello, I have a data file I'm searching. I know the line numbers that the data I want is in. I now want to extract only those lines in the file and output them to a new file. How do I do that using...
Summary: Probably a faster/better way, but this works for me. cat names | head -2 | tail -1 Where 2 can be changed to whatever line number you want to see. ...