[prev in list] [next in list] [prev in thread] [next in thread]
List: mumps-l
Subject: Re: ftp script
From: "Reeder, Lawrence" <LReeder () chw ! org>
Date: 2004-05-12 13:49:57
Message-ID: 20D8706FAC0DA841A411E5D9A3E87829E097E6 () CHWEXC ! chwi ! chswi ! org
[Download RAW message or body]
Here's how I've put it together. The items in [] are for you to fill in. The put \
script accept two parameters, sourcefile destfile (in case you want to name it \
something different on the destination). You'll notice the <<eoftp in the /bin/ftp \
line, this is the start of a section and what follows are the ftp commands and that \
list ends with the same name eoftp. They must match, less the <<.
You can make either of these more generic and pass in all the things you want, just \
refer to the parameters in the appropriate places. Good Luck!
----------------------------------------------------------------------------
#! /bin/ksh
#* Filename: ftp_get
cd /home/lgrdir
/bin/ftp -vin [hostaddress or IPaddress] <<eoftp
user [USERNAME] [PASSWORD]
cd [HOST DIRECTORY]
ascii
get [FILENAME]
quit
eoftp
#***********end of ftp_get***************
----------------------------------------------------------------------------
#! /bin/ksh
#***************************************************************************
#* Filename: ftp_put
#* parameters passed in: 1 - original filename
#* 2 - new filename
#****************************************************************************
cd /home/lgrdir
server=[servername/ipaddress]
user=[USERNAME]
pw=[PASSWORD]
targetpath=[HOST DIRECTORY]
/bin/ftp -vin ${server} <<eoftp
user ${user} ${pw}
cd ${targetpath}
put ${1} ${2}
quit
eoftp
#***********end of ftp_put***************
Larry Reeder
Sr. Systems Analyst
Children's Hospital & Health System of Wisconsin
Phone: 414.266.3272
Fax: 414.266.2898
Web: www.chw.org
<><
-----Original Message-----
From: MUMPS List [mailto:MUMPS-L@LISTSERV.UGA.EDU]On Behalf Of SHERMAN,
SETH
Sent: Wednesday, May 12, 2004 8:32 AM
To: MUMPS-L@LISTSERV.UGA.EDU
Subject:
Dose anyone out there have a UNIX script that will allow me to 'put' and
get' files via FTP?
Thanks in advance.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic