NAME

rcommand - simple remote command launcher

SYNOPSIS

$ rcommand [OPTIONS] HOSTS COMMANDS
$ rcommand [OPTIONS] --host-file FILE COMMANDS
$ rcommand [OPTIONS] HOSTS --script SCRIPT [SCRIPT_ARGS]

OPTIONS

-s, --script=SCRIPT       execute local script file instead of COMMANDS argument
-H, --host-file=FILE      set target hosts by host listed file
-a, --ask-sudo-password   raise prompt for sudo password first
    --sudo-password=PASS  set sudo password
-c, --concurrency=NUM     parallel concurrency, default 5
    --append-hostname     append hostname to each output line, default on
    --append-time         append time to each output line, default off
    --sudo=USER           execute COMMAND or SCRIPT with sudo -u USER
-F                        ssh configfile
-q, --quiet               do not show SUCCESS/FAIL results
-h, --help                show this help
-v, --version             show version

EXAMPLES

$ rcommand example.jp 'uname -a'
$ rcommand example.jp --script foo.pl
$ rcommand example.jp --script script.pl arg1 arg2 arg3
$ rcommand --host-file host.txt 'uptime; top -b -n 1'
$ rcommand --ask-sudo-password '{www1,www2}.example.com' -- sudo rm -rf /tmp/trash
$ rcommand --ask-sudo-password --sudo root example.com 'service restart httpd'
$ rcommand --ask-sudo-password --sudo app example.com --script script.sh

HOSTS will be expand by String::Glob::Permute::string_glob_permute function.
For example,

 example.{com,jp}      ->  example.com, example.jp
 example[001-003].com  ->  example001.com, example002.com, example003.com
 {prod,qa}[01-02].com  ->  prod01.com, prod02.com, qa01.com, qa02.com

LICENSE

Copyright (C) Shoichi Kaji.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Shoichi Kaji <skaji@cpan.org>