[Ssh-sftp-perl-users] want to get rid of IO::Socket::INET messages.
Brought to you by:
dbrobins
|
From: Ajit <aji...@re...> - 2006-04-20 10:35:06
|
Hi Guys,=0AI have written a small perl script =0A=0A#!/usr/bin/perl=0Ause s=
trict;=0Ause Net::SSH::w32Perl;=0Ause Net::SSH::Perl;=0A=0Amy $user =3D "ro=
ot";=0Amy $pass =3D "password";=0Amy $host =3D "192.168.0.123";=0Amy $cmd =
=3D "ls -lt";=0Amy $ssh =3D Net::SSH::W32Perl->new($host);=0A=0A$ssh->login=
($user, $pass);=0Amy @test =3D $ssh->cmd($cmd);=0Aprint @test; =0A=0A=0AThe=
script when executed gives desired output ,=0Abut it gives some additional=
messages before giving proper output=0Athese messages are as follows , =
=0A=0AIO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295=0A=
IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295=0AIO::So=
cket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295=0AIO::Socket::=
INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295=0AIO::String at C:/P=
erl/site/lib/Net/SSH/Perl/Channel.pm line 110=0AIO::Socket::INET at C:/Perl=
/site/lib/Net/SSH/Perl/SSH2.pm line 295=0AIO::String at C:/Perl/site/lib/Ne=
t/SSH/Perl/Channel.pm line 110=0AIO::Socket::INET at C:/Perl/site/lib/Net/S=
SH/Perl/SSH2.pm line 295=0AIO::String at C:/Perl/site/lib/Net/SSH/Perl/Chan=
nel.pm line 110=0AIO::String at C:/Perl/site/lib/Net/SSH/Perl/Channel.pm li=
ne 118=0AIO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295=
=0AIO::String at C:/Perl/site/lib/Net/SSH/Perl/Channel.pm line 110=0AIO::So=
cket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295=0Atotal 9250=
=0Adr-xr-xr-x 52 root root 63168 Apr 20 15:56 proc=0Adrwxrwxrwt =
4 root sys 249 Apr 20 15:55 tmp=0Adrwxr-xr-x 17 root sy=
s 4096 Apr 20 11:00 dev=0A-rw-r--r-- 1 root root 13770 =
Apr 20 11:00 buildsanity=0Adr-xr-xr-x 6 root root 512 Apr 13 =
14:05 vol=0Adrwxr-xr-x 75 root sys 4096 Apr 13 14:05 etc=0Adr-=
xr-xr-x 1 root root 1 Apr 13 14:05 home=0Adr-xr-xr-x 1 ro=
ot root 1 Apr 13 14:05 net=0Adrwxr-xr-x 2 root sys =
512 Apr 13 14:03 devices=0Adrwxr-xr-x 2 root root 512 Ap=
r 5 15:43 Documents=0Adrwxr-xr-x 40 root sys 1024 Mar 30 11:2=
4 usr=0Adrwxr-xr-x 8 14478 staff 512 Mar 23 16:20 opt=0Adrwxr-x=
r-x 6 root root 512 Mar 21 16:55 cdrom=0A-rw-r--r-- 1 root =
root 26 Mar 20 14:52 sdm=0Adrwxr-xr-x 2 root root =
512 Mar 20 14:11 Desktop=0A-rw-rw-r-- 1 root gsm 68624 Mar =
3 19:44 Message.log=0Adrwxr-xr-x 11 root sys 512 Mar 2 15:27=
mnt=0A-rwxr-xr-x 1 root root 607744 Feb 23 13:27 ssh.tar=0A-rwx=
r-xr-x 1 root root 93184 Feb 23 12:45 tar.sh=0Adrwxr-xr-x 2 r=
oot root 512 Feb 23 11:16 TT_DB=0Adrwxr-xr-x 41 root sys =
1024 Feb 23 11:12 var=0Adrwxr-xr-x 7 root bin 5120 Feb=
23 10:53 lib=0Adrwxr-xr-x 14 root sys 512 Feb 22 19:12 kerne=
l=0Adrwxr-xr-x 2 root sys 1024 Feb 22 19:06 sbin=0Adrwxr-xr-x=
33 root sys 1024 Feb 22 18:38 platform=0Adrwxr-xr-x 4 root =
root 512 Feb 22 18:38 system=0Alrwxrwxrwx 1 root root =
9 Feb 22 18:38 bin -> ./usr/bin=0Adrwxr-xr-x 3 root sys =
512 Feb 22 18:37 export=0Adrwx--x--x 2 root root 8192 Feb 2=
2 18:37 lost+found=0A0=0A=0AHow can i overcome these additional messages a=
nd "0" after my desired output.=0A=0AThanks=0A~ajit=0A=0AMobile :- 98906717=
07=0D=0A=0D=0A"Success is not the result of spontaneous combustion. You mus=
t set yourself on fire." =0D=0A=0D=0A |