App-MrShell

 view release on metacpan or  search on metacpan

MrShell.pm  view on Meta::CPAN

use warnings;

use Carp;
use POSIX;
use Config::Tiny;
use POE qw( Wheel::Run );
use Term::ANSIColor qw(:constants);
use Text::Balanced;

our $VERSION = '2.0207';
our @DEFAULT_SHELL_COMMAND = (ssh => '-o', 'BatchMode yes', '-o', 'StrictHostKeyChecking no', '-o', 'ConnectTimeout 20', '[%u]-l', '[]%u', '%h');

# new {{{
sub new {
    my $class = shift;
    my $this  = bless { hosts=>[], cmd=>[], _shell_cmd=>[@DEFAULT_SHELL_COMMAND] }, $class;

    return $this;
}
# }}}

mrsh  view on Meta::CPAN


L<mrsh> doesn't keep any logs by default.  Users may specify a logfile location
to start logging.  Logs will be appended (even between runs) unless the truncate
option is specified -- in which case, the logfile will simply be overwritten
instead.

=item B<--shell> B<-s>

By default, L<mrsh> uses the following command as the shell command.

    ssh -o BatchMode yes -o StrictHostKeyChecking no -o ConnectTimeout 20 [%u]-l []%u %h

The C<%h> will be replaced by the hostname(s) during execution
(see L</COMMAND ESCAPES>).

Almost any shell command will work, see C<t/05_touch_things.t> in the
distribution for using perl as a "shell" to touch files.  Arguments to B<-s> are
space delimited but understand very simple quoting:

=item B<--noesc> B<-N>

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.481 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )