From: Blackstone, J. D. <jda...@ci...> - 2002-01-10 16:53:19
|
> -----Original Message----- > From: RGi...@a1... [mailto:RGi...@a1...] > Sent: Thursday, January 10, 2002 10:30 AM > To: Rick_Jasper/Delphion%DEL...@de... > Cc: exp...@li... > Subject: Re: [Expectperl-discuss] Beginner Questions: > Reference & How to > Handle Large Output > > > > I've got Expect 1.12 on an AIX 4.3.3 system, trying to figure out > > how best > > to use it to ssh to some other system overseas, run a > command on that > > oversea system that produces a lot of output (1.5 million lines, > > 136 MB > > total), collect and process that output on my system. > > Ugh, and there is no other way to do that? Is it really an > interactive > application? How about just doing a ssh command and capture the > output? Or having the remote system dump that data to a disk > and then > transfer that with scp? To be specific, Rick, you should be able to: $ ssh remote-host remote-command args > localfile You might look into ssh key generation to eliminate the need for a password. I recommend the O'Reilly snail book, as well as some articles by the creator of Gentoo Linux on IBM developer works (you'll want to do a google search; it always takes me forever to find those articles when I need them). You can system() from Perl to call the ssh if you need this to be part of a larger program. There's also a Net::SSH::Perl module that can do the ssh protocol itself, without the overhead of calling a separate command. (I think.) You could even open $fh, "ssh remote-host remote-command args |" || die... Of course, if this is a screen-oriented (curses?) interface you're using on the remote system, you might not be able to do any of this. That's my plight. jdb |