GP7
asked on
how to grep number of rows in vi
Hi,
What is the command to grep number of rows in vi editor? i need to grep the number of records from a log file. each record has a lot of cols which extend upto many lines. now i want to grep the number of records... not lines.
Thanks
What is the command to grep number of rows in vi editor? i need to grep the number of records from a log file. each record has a lot of cols which extend upto many lines. now i want to grep the number of records... not lines.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
What was wrong with my answer? <ESC><Ctrl><g> is much faster to type than <ESC><:>set nu<enter><:><$><enter>
(press Ctrl and g simultaneously. Do not press colon : !)
You will see a message "The cursor is at line l of n --- xx % ---", or "n lines -- x% --"
with n being the number of rows in the file.
wmp