Home » Infrastructure » Unix » char. position in the text file.
char. position in the text file. [message #236384] Wed, 09 May 2007 15:29 Go to next message
sivaparam
Messages: 16
Registered: March 2005
Junior Member
Hi
How do I know, what is the char. position of my cursor in vi editor.
For example, let us say, at this point, my cursor is line 3, char. position 13. What is the command I should use to display the same.

OR

Can I use grep command ? When I search for certain char. it can result position of that char. in that text file.

thanks
siva
Re: char. position in the text file. [message #237079 is a reply to message #236384] Fri, 11 May 2007 15:47 Go to previous messageGo to next message
Frank Naude
Messages: 4581
Registered: April 1998
Senior Member
This may help:

Control-G shows filename, current line number, total lines in file, and % of file location.
Re: char. position in the text file. [message #238148 is a reply to message #236384] Wed, 16 May 2007 19:07 Go to previous message
sivaparam
Messages: 16
Registered: March 2005
Junior Member
Thanks Frank. It really did not help.
One my friend suggested, "go to start of the line. and hit "10 and space bar" to go to 10 th character of that line. "

Though it is not fully addressed my issue, helped me some extent.
thanks
siva

Previous Topic: call a stored procedure with parameters from shell script
Next Topic: remove the spaces in between the fields
Goto Forum:
  


Current Time: Fri Nov 22 03:59:16 CST 2024