- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- FTP scripting
Operating System - HP-UX
1753837
Members
9222
Online
108806
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2000 03:55 PM
тАО07-14-2000 03:55 PM
FTP scripting
One of the responses to "Transfer files between two systems" referenced ftp scripting. I didn't think it could be done. Can someone please direct me to some good references as to how to do this?
Thanks,
Grant
Thanks,
Grant
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2000 04:59 PM
тАО07-14-2000 04:59 PM
Re: FTP scripting
Use a shell 'here' document (check a KSH or POSIX shell script manual for more details) and the non-interactive flag (-n) for ftp:
ftp -n << EOF
open some_host
lcd /tmp
cd /etc
ascii
get fstab
close
EOF
With here documents, env variables are expanded before being sent to ftp, making a general batch ftp possible as in:
MYHOST=cpu.mydomain.com
LOCALDIR=/tmp
REMOTEDIR=/etc
MYFILE=fstab
ftp -n << EOF
open $MYHOST
lcd $LOCALDIR
cd $REMOTEDIR
ascii
get $MYFILE
close
EOF
Bill Hassell, sysadmin
ftp -n << EOF
open some_host
lcd /tmp
cd /etc
ascii
get fstab
close
EOF
With here documents, env variables are expanded before being sent to ftp, making a general batch ftp possible as in:
MYHOST=cpu.mydomain.com
LOCALDIR=/tmp
REMOTEDIR=/etc
MYFILE=fstab
ftp -n << EOF
open $MYHOST
lcd $LOCALDIR
cd $REMOTEDIR
ascii
get $MYFILE
close
EOF
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-17-2000 05:11 AM
тАО07-17-2000 05:11 AM
Re: FTP scripting
Grant:
A recent thread touched on this. See "Automation of FTP Processes".
...JRF...
A recent thread touched on this. See "Automation of FTP Processes".
...JRF...
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP