![]() |
|
|
|
|
|||||||
| 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 |
| Automate FTP | borncrazy | Shell Programming and Scripting | 11 | 02-20-2008 09:10 PM |
| automate Telnet ? | tbeghain | Shell Programming and Scripting | 4 | 06-19-2007 03:09 AM |
| How to automate an FTP process? | ksak | Shell Programming and Scripting | 1 | 10-06-2006 09:45 AM |
| How to automate responses | djp | Shell Programming and Scripting | 2 | 06-07-2005 01:00 PM |
| Automate FTP | CamTu | UNIX for Advanced & Expert Users | 4 | 02-25-2005 07:08 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#8
|
|||
|
|||
|
perhaps if I keep is simpler and create the .netrc manually, but
how to kick off the macdef init? machine mainframe login demo password demo macdef init get "fileone" would this work? Thanks |
| Forum Sponsor | ||
|
|
|
#9
|
|||
|
|||
|
in giannicello's script I noticed that there are two if's and only 1 fi
the script might work if you add another fi to end the statement sorry if you allready tried it Mike |
|
#10
|
||||
|
||||
|
By searching this site for "automated ftp jobs", I found this old post of mine. You simply need to replace the "print -p put tar.gz" line with:
print -p get \'111.111.111.111\' print -p get \'222.222.222.222\' I created two files with those names and just ran the script. It worked. |
|
#11
|
|||
|
|||
|
I also would put a sleep command between each upload (especially if they are large files)...makes it safer that each will be completed.
Also you haven't said whether or not there would be any other filenames of this 'format' as you put it. If there are no other files that start 111 in the directory - then a simple mget \'111* would suffice and you could just put the sleep command after this before you exit. If this is the case use ftp -i (to turn off the interactive prompting for mget).
__________________
Pete |
|
#12
|
|||
|
|||
|
Thanks all,
It works now using this script: #!/usr/bin/ksh ftp -v -n "mainframe" << cmd >> ftplog user "userid" "password" get '111.111.111.111.111' file1 get '222.222' file2 get '33.33.33' file3 quit cmd flowrats |
|||
| Google The UNIX and Linux Forums |