2007. 11. 3. 21:34 Unix

vi상에서 명령실행

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

                       Unix Tip 2388 - July 16, 2006

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

vi에서 실행

vi에서 쉘스크립트를 작성하는 동안 명령어들을 커맨드라인에서 테스트하기 위해
vi를 빠져나오기 위해 시간을 허비한다고 생각해본적이 있는가?
 
생산성을 증가시키기 위해 스크립트를 작성하기 전에 편집기 내에서 이 명령들을
실행하고 결과를 볼 수 있다면 상당히 빠르게 작성할 수 있을 것이다.

방법은 가능하고 상당히 직관적이다. vi에서 다음을 입력하라.

:!testscript

(콜론과 느낌표)

다음 $ 또는 # 프롬프트에서 했던 것처럼 명령어를 입력하라.
 
명령이 실행되고 결과가 표시될 것이며 다음작업을 계속하기 위해 return 키를
입력하라는 프롬프트가 뜨게 된다.

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

VI EXECUTION

While writing shell scripts
in vi, have you ever considered
the time wasted by going in
and out of vi to test your
commands by executing them on
the command line.

To increase your productivity,
it would be a lot quicker if you
could execute these commands
from within the editor and view
their output before writing them
to your script.

This is possible and quite
straight forward.  Enter the
following within vi

:!testscript

(i.e. colon exclamation mark)

Then enter your command as you
would at the $ or # prompt.

The command executes, the result
is displayed and you are propmted
to press return to continue.
반응형
Posted by She쥐포s

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

달력

 « |  » 2024.5
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 31

최근에 올라온 글

최근에 달린 댓글

글 보관함