[Cialug] corn shell

Cesar Mendoza mendoza at kitiara.org
Thu Sep 22 15:07:31 CDT 2005


Here is a oneliner that would download an ftp file using Net::FTP.

perl -MNet::FTP -e '$ftp=Net::FTP->new("mirrors.kernel.org");$ftp->login("anonymous","-anonymous\@");$ftp->get("robots.txt");'

I will download the file robots.txt from mirrors.kernel.org. If you want
to put a file, just change get for put.

Bye
Cesar Mendoza
http://www.kitiara.org
--
"First they tell you, you're wrong and they can prove it; 
then they tell you, you're right but it isn't important; 
then they tell you, it's important but they knew it all along."
 --Charles Kettering


On Thu, Sep 22, 2005 at 12:53:08PM -0500, Josh More wrote:
> You can also script FTP with expect or in perl with Net::FTP 
>  
> 
> 
> 
> -- 
> -Josh More, RHCE, CISSP, NCLP
> morej at alliancetechnologies.net
> 515-245-7701
> 
> >>>jweida at gmail.com 09/22/05 12:41 pm >>>
> Many times you can script ftp by doing something like
> 
> #!/bin/ksh
> ftp -n <<
> quote user <username>
> quote pass <password>
> bin
> get <filename>
> put <filename>
> quit
> 
> 
> On 9/22/05, Nathan C. Smith <smith at ipmvs.com> wrote:
> >
> >LOL
> >
> >-----Original Message-----
> >From: Dave Weis [mailto:djweis at internetsolver.com]
> >Sent: Thursday, September 22, 2005 11:20 AM
> >To: Central Iowa Linux Users Group
> >Subject: Re: [Cialug] corn shell
> >
> >
> >
> >A corn shell is usually called a husk :-)
> >
> >The Korn shell is the default on AIX machines. You can use a program
> >called expect to script ftp transfers, but native FTP is intended for
> >interactive use.
> >
> >David Stout wrote:
> >>I need a simple csh scrip that will ftp a file.
> >>can someone give me a little insight.
> >>
> >>thanks
> >>
> >>
> >
> >
> >Cialug mailing list
> >Cialug at cialug.org
> >http://cialug.org/mailman/listinfo/cialug
> >
> >Cialug mailing list
> >Cialug at cialug.org
> >http://cialug.org/mailman/listinfo/cialug
> >
> 

> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug



More information about the Cialug mailing list