![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pipes not working | Furqan_79 | Shell Programming and Scripting | 1 | 05-29-2008 06:52 AM |
| perl help with pipes and file handles (simple issue) | the_learner | Shell Programming and Scripting | 1 | 05-06-2007 02:34 AM |
| tee into 2 named pipes | zzol | UNIX for Advanced & Expert Users | 9 | 12-12-2006 05:10 PM |
| cd using pipes | Sinbad | Shell Programming and Scripting | 2 | 09-09-2004 07:05 AM |
| PIPEs and Named PIPEs (FIFO) Buffer size | Jus | Filesystems, Disks and Memory | 1 | 08-20-2004 07:14 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am attempting to automate an ftp session in PERL by emulating the user and sending commands to ftp, but I am getting unexpected and unwanted results. Here is a portion code that illustrates the method I am attempting (this was just a shot in the dark):
system("( echo open server sleep 1 echo username sleep 1 echo password sleep 1 echo ls) | ftp"); The ftp server doesn't appear to be interpretting the commands, and it appears to hang up somewhere around the username/password entry. Any help would be appreciated. Thanks. Bryan Murdaugh |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Use Net::FTP Module from http://search.cpan.org
$ftp = Net::FTP->new("some.host.name", Debug => 0); $ftp->login("name",'pass'); $ftp->cwd("mydir"); $ftp->get("file"); $ftp->quit; HTH |
|
#3
|
|||
|
|||
|
That was my first impulse, just to get the ftp module and use it, but I was hoping to get around it because this script needs to run on a LOT of machines. However, if there's no down-and-dirty brute force method to do it, I'll have to bite the bullet and install the module on all of the machines.
Thanks for the help! Bryan |
|||
| Google The UNIX and Linux Forums |