Easy Screen Scripting
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
lib
spec
.document
.gitignore
LICENSE
README.md
Rakefile

README.md

EasyScreen

Usage

Open Several Windows

Screen('Beatles') {
    ['John', 'Paul', 'George', 'Ringo'].each {|member|
        window(member)
    }
}

ends up like this:

Execute Commands for each Window

Screen('admin') {
    window('vi')   { exec 'vi' }
    window('top')  { exec 'top' }
    window('tail') { exec 'tail -f /var/log/apache2/error_log' }
}

ends up like this:

username = 'your_username' password = 'your_password'

SSH Other Server in each Window

Screen('log_tail') {
    username, password = 'some_username', 'some_password'
    servers = ['web01', 'web02', 'web03', 'app01', 'app02', 'app03']
    servers.each {|s|
        window(s) {
            ssh s, username, password
            exec 'tail -f /var/apache2/log/error_log'
        }
    } 
}

Install

gem install easy-screen

Requirements

  • ruby 1.8.7 or later
  • GNU screen

Links

Copyright

Copyright (c) 2010 tily. See LICENSE for details.