vi에서 특정 단어 갯수 세어보기

:%s/word/&/g

x개 바꿨음, x줄에서

라고 나온다.
하지만 실제로 바뀌지는 않는다.
아마 &가 앞의 단어를 나타내므로
자기자신으로 바뀐 듯...

아래 사이트에서 참조했다.

http://textsnippets.com/posts/show/882

From one of the comments in http://www.vim.org/tips/tip.php?tip_id=689

:%s/word/&/g


The above substitutes "word" for itself, and tells you the number of substitutions made.
to vi count vim by sergiovalenzuela on Thu Jan 25 20:44:53 +0000 2007

by 꽁니아빠 | 2008/01/03 20:59 | Linux | 트랙백 | 덧글(0)
트랙백 주소 : http://baekyj.egloos.com/tb/3561059
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]

:         :

:

비공개 덧글

< 이전페이지 다음페이지 >