편집할 대상파일의 지정한 단어가 처음 나오는 행부터 vi열기
작성자 정보
- 관리자 작성
- 작성일
컨텐츠 정보
- 2,034 조회
- 0 추천
- 목록
본문
편집할 대상파일의 지정한 단어가 처음 나오는 행부터 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”라는 문자열이 존재하는 행의 맨 앞에 커서가 위치하고 있음을 알 수 있습니다.
관련자료
-
이전
-
다음