=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                             UNIX GURU UNIVERSE
                                UNIX HOT TIP

                       Unix Tip 2330 - May 19, 2006

                   
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

vi에서 파일간 복사하기

다음은 vi 편집기에서 필요한 수의 라인을 한 파일에서 다른 파일로 복사하는 방법이다.
먼저 원본 파일에서 다음의 키 조합을 사용하여라.

ESC키를 누른다.
Shift "(Shift 쌍따옴표)
a키를 누른다.
복사할 라인의 수를 누른다.
yy를 누른다.

이제 :(콜론)을 눌러 vi 프롬프트를 호출한다. 이 상태에서 e 대상파일명을 입력한다.
일단 대상파일이 열리면 복사한 라인들이 삽입될 라인으로 이동한다.

ESC키를 누른다.
Shift "(Shift 쌍따옴표)
a키를 누른다.
p키를 누른다.

라인이 복사되었다.

@@@@@@@@@@@@@@@@@@@@[ 원문 ]@@@@@@@@@@@@@@@@@@@@

VI COPY FILE TO FILE

Here is how to copy the required number
of lines from one file to another in
VI editor.  First use the following
key combinations in the source file.

Press ESCAPE
Press Shift "(Shift double quotes)
Press a
Press the number of lines you want to copy
press y followed by another y

Now press " : " (COLON) to get the vi prompt.
Hit e "Destination file name"
Once you enter the Destination file
go to the line where you want the lines
copied to be inserted.

Press ESCAPE.
Press SHIFT "(Double quotes).
Press a.
Press p.

The lines get copied.
반응형
Posted by She쥐포s

블로그 이미지
She쥐포s
Yesterday
Today
Total

달력

 « |  » 2024.4
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

최근에 올라온 글

최근에 달린 댓글

글 보관함