강좌
클라우드/리눅스에 관한 강좌입니다.
리눅스 분류

편집할 대상파일의 지정한 단어가 처음 나오는 행부터 vi열기

작성자 정보

  • 관리자 작성
  • 작성일

컨텐츠 정보

본문

편집할 대상파일의 지정한 단어가 처음 나오는 행부터 vi열기

 

 

 

 

 

다음은 vi를 시작하면서 특정 단어가 존재하는 행을 vi의 시작화면으로 하기 위한 방법입니다.

 

 

 

 

 , 특정 단어를 찾아서 편집하기 위한 방법으로 매우 실용적인 방법입니다.

 

 

 

 

 , vi시작 시에 특정 단어가 나오는 위치부터 오픈하려면 “vi +/“단어파일명과 같은 형식으로 시작하시면 됩니다.

 

 

 

 

 

 

아래의 예는 testfile vi로 오픈하면서 www.openoffice.org”라는 단어가 나오는 행에 커서가 위치하도록 지정한 예입니다.

 

 

 

 

 

 

[root@su250 sulinux]# vi +/"www.openoffice.org" testfile

 

------------------------------------------------------------

OpenOffice.org 3.0 ReadMe

------------------------------------------------------------

 

For latest updates to this readme file,

see http://www.openoffice.org/welcome/readme.html

Dear User

 

This file contains important information about this program.

Please read this information very carefully before starting work.

 

The OpenOffice.org Community, responsible for the development

of this product, would like to invite you to participate

as a community member. As a new user,

you can check out the OpenOffice.org site with helpful user information at

 

http://www.openoffice.org/about_us/introduction.html

 

Also read the sections below about getting

involved in the OpenOffice.org project.

 

 

 

 

 

위의 예는 vi를 시작하면서 www.openoffice.org”라는 문자열이 존재하는 행의 맨 앞에 커서가 위치하고 있음을 알 수 있습니다.

 

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,043 명
  • 현재 강좌수 :  35,853 개
  • 현재 접속자 :  113 명