tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: "Blom, Wayne" <Wayne.Blom () au ! faulding ! com>
To: tru64-unix-managers
Subject: SUMMARY: scripted ftp - is it possible and if so how?
Date: Thu, 17 Aug 2000 00:23:34 +0000	[thread overview]
Message-ID: <96647098622907.tru64-unix-managers.marc@archive.invalid> (raw)

Gidday all,
I would like to thank the 34 people who sent a reply.

Information ranged from "Check .netrc in the man pages" to complete =
scripts
in both shell and perl.
In essence; The answer is yes it is possible and here's how;

1.) Using a script of the form;
	ftp -n -v << EOF > .ftplog
	open $HOST
	user $USER $PASSWORD
	ascii
	put $file $sendfile
	quit
	EOF

	grep -q "226 Transfer complete." .ftplog
	sentok=3D$?

  Here the EOF is a flag which is called at the end of the ftp script =
to
complete the ftp component

2.) Use the expect package;
	 http://expect.nist.gov/

3.) Use ncftp;
	http://www.ncftp.com
This has some nice command line capabilities.

4.) Use perl and the nettools module from CSPAN (http://www.cpan.org/) =
and
the following sort of construct;
#!/usr/local/bin/perl
   use Net::FTP;
   $ftp =3D Net::FTP->new("some.host.name");
   $ftp->login("joe","bob");
   $ftp->cwd("/pub");
   $ftp->get("that.file");
   $ftp->quit;
This provides excellent monitoring of the status of the transfer.

5.) or simply put the components in a file and suck it into ftp;
The file will look like:

		user anonymous someone@company.com
		cd /in_files/dir1
		binary
		prompt
		mput *.jpg
		quit

It can then be used in the following way:

		ftp -n remote_machine < ftp_commands

6.) Use wget from GNU. Unfortunately this only retrieves. We need to =
send.

I have tried none of these as yet but favour standard ftp script as a =
first
(emergency) fix. Perhaps one day I will clean it up and make it really =
sing.

The following people provided information and their expertise;

Hasan Atasoy [HAtasoy@ifk.com.tr],
Gavin Kreuiter [gavin@transactive.usko.com],
Antonio Urbano [a.urbano@lycos.com],
Knut Helleb=F8 [Knut.Hellebo@nho.hydro.com],
Michael Whittaker (QDT) [Michael.Whittaker@edt.ericsson.se],
Nikola Milutinovic [Nikola.Milutinovic@ev.co.yu],
Chewy [chewy@slamon.com],
Peter.Stern@weizmann.ac.il,
jean.schuller [Jean.Schuller@IReS.in2p3.fr],
Freesmeyer, Mary [mfreesmeyer@cvty.com],
M selcukkaraca [selcuk.karaca@aski.gov.tr],
Dmitry Makhrov [dmakhrov@crystal.kz],
Michael James Bradford [mjbr@tdk.dk],
Matt White [whitem@bofh.usask.ca],
Ann Cantelow [cantelow@atlas.csd.net],
nikhil [nikhilnews@myiris.com],
David Henden [david.henden@domain.se],
Oyanarte Portilho [portilho@helium.fis.unb.br],
Roetman, Paul [PRoetman@CSXLines.com],
Bochnik, William J [BochnikWJ@bernstein.com],
Bruce B. Platt [bbp@comport.com],
Jim Fitzmaurice [jpfitz@fnal.gov],
Dyer, Steve J. [Steve.Dyer@alcoa.com],
Jim Belonis [belonis@dirac.phys.washington.edu],
Davis, Alan [Davis@tessco.com],
George Gallen [ggallen@slackinc.com],
system administration account [sysadmin@astro.su.se],
Larye D. Parkins [larye@selway.umt.edu],
Evans, William [Bill.C.Evans@wcom.com],
Balfour, Scott (Eurosoft) [scott.balfour-eds@eds.com],
Serguei Patchkovskii [patchkov@ucalgary.ca],
Thomas M. Payerle [payerle@physics.umd.edu],
Tom Webster [webster@SSDPDC.LGB.CAL.BOEING.COM]


Thanks=20
Wayne Blom=20
System Specialist=20
Technical Development Healthcare=20
F H Faulding & Co Limited=20
Ground Floor=20
1 Station St=20
Hindmarsh SA 5007=20
Ph:         +61 8 8241 8334=20
FAX:      +61 8 8241 8357=20
Mobile:         +61 0419 808 496=20
Email:  wayne.blom@au.faulding.com=20

                 reply	other threads:[~2000-08-17  0:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox