ZigZaggin has asked for the wisdom of the Perl Monks concerning the following question:
THIS DOESN'T WORKmy $chan = $ssh2->channel(); $chan->blocking(0); $chan->exec('ls -la /db2home/idsldap/idsslapd-idsldap/logs/'); while (<$chan>){ print FILE } print FILE "\n\n\n\n"; $ssh2->disconnect(); ### DISCONNECT ###
my $chan = $ssh2->channel(); $chan->blocking(0); $chan->exec('zcat /db2home/idsldap/idsslapd-idsldap/logs/ibmslapd.log. +$ibmslapd_fn-2350.gz | grep -i "entries have been successfully" '); while (<$chan>){ print FILE } print FILE "\n\n\n\n"; $ssh2->disconnect(); ### DISCONNECT ###
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: NET:SSH2 exec syntax usage
by Illuminatus (Curate) on Apr 15, 2011 at 22:20 UTC | |
by SitrucHtims (Novice) on Apr 15, 2011 at 23:46 UTC | |
by ZigZaggin (Initiate) on Apr 18, 2011 at 17:53 UTC | |
by SitrucHtims (Novice) on Apr 22, 2011 at 01:07 UTC |