screen 에서
C-a c 해서 창을 여러개 만들고
각각의 창에서 여러대의 서버에 접속 한다음
열려있는 모든 창에 동일한 명령어를 날릴 수 있는 방법이 있나요??
http://blog.cone.be/2009/11/24/gnu-screen-nethack-different-screen-windows-sending-commands-to-all-screen-windows/
되면 한다! / feel no sorrow, feel no pain, feel no hurt, there's nothing gained.. only love will then remain.. 『 Mizz 』
오픈스택 설치 스크립트인걸로 기억하는데, rc.local 에서 각 데몬들을 screen 명령어로 각각 다른 screen 윈도우에 실행하는 것을 보고 screen 명령을 이렇게도 활용할 수 있구나 하고 감탄했었지요.
핵심은 1. screen 실행할때 Session명을 지정 2. 각 창을 생성할때 Title 지정 3. 원하는 창에 명령 실행시 끝에 엔터 문자 꼭!!! 추가 (^M : vi 에서는 Ctrl+v, Ctrl+M 으로 입력하는데, 다른 에더터에선 어떻게 하는지 검색 필요)
다음처럼 쉘스크립트를 생성해서 실행합니다.
screen -d -m -S MySession -t Win1st screen -S MySession -p Win1st -X stuff "echo 'This is 1st Window.'^M" screen -S MySession -X screen -t Win2nd screen -S MySession -X screen -t Win3rd screen -S MySession -p Win2nd -X stuff "echo 'This is 2nd Window'^M" screen -S MySession -p Win3rd -X stuff "echo 'This is 3rd Window'^M" screen -ls screen -r MySession
텍스트 포맷에 대한 자세한 정보
<code>
<blockcode>
<apache>
<applescript>
<autoconf>
<awk>
<bash>
<c>
<cpp>
<css>
<diff>
<drupal5>
<drupal6>
<gdb>
<html>
<html5>
<java>
<javascript>
<ldif>
<lua>
<make>
<mysql>
<perl>
<perl6>
<php>
<pgsql>
<proftpd>
<python>
<reg>
<spec>
<ruby>
<foo>
[foo]
음 ..
http://blog.cone.be/2009/11/24/gnu-screen-nethack-different-screen-windows-sending-commands-to-all-screen-windows/
되면 한다! / feel no sorrow, feel no pain, feel no hurt, there's nothing gained.. only love will then remain.. 『 Mizz 』
오픈스택 설치 스크립트인걸로 기억하는데, 각
오픈스택 설치 스크립트인걸로 기억하는데,
rc.local 에서 각 데몬들을 screen 명령어로 각각 다른 screen 윈도우에 실행하는 것을 보고
screen 명령을 이렇게도 활용할 수 있구나 하고 감탄했었지요.
핵심은
1. screen 실행할때 Session명을 지정
2. 각 창을 생성할때 Title 지정
3. 원하는 창에 명령 실행시 끝에 엔터 문자 꼭!!! 추가 (^M : vi 에서는 Ctrl+v, Ctrl+M 으로 입력하는데, 다른 에더터에선 어떻게 하는지 검색 필요)
다음처럼 쉘스크립트를 생성해서 실행합니다.
댓글 달기