- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- FTP Using Shell script
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
05-10-2006 04:15 PM
05-10-2006 04:15 PM
FTP Using Shell script
I wants to write a Shell script which can be connected to a remote ftp server with a user name (not anonymous).
Can any one help me how to write the script for entering a user name and password for the ftp server
cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2006 04:20 PM
05-10-2006 04:20 PM
Re: FTP Using Shell script
Check this thread for FTP Script,
http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=989518
http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=811436
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2006 04:28 PM
05-10-2006 04:28 PM
Re: FTP Using Shell script
ftpget.pl -h remotehost -l username -p topsecret -d /var/tmp -A myfile1 myfile2
STAT=${?}
if [[ ${STAT} -eq 0 ]]
then
echo "OK"
else
echo "FTP failed; status ${STAT}" >&2
fi
This will login to host "remotehost" as user "username", password "topsecret", cd to /var/tmp, enter ASCII mode (-A); and finally get myfile1 and myfile2. If it exits with a zero status then all is well.
If you need to do a put search for "ftpput.pl".
Invoke as ftpget.pl -u for full usage.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2006 06:34 PM
05-10-2006 06:34 PM
Re: FTP Using Shell script
#/usr/bin/ksh
################################3
ftp -n xxx.xxx.xxx.xxx << EOF
user anonymous xxx@yyy.com
bi
cd ${target_dir}
put ${source} ${target}
bye
EOF
Good Luck ~~
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2006 07:06 PM
05-10-2006 07:06 PM
Re: FTP Using Shell script
here is a script I use to send one or more files to a remote ftp server.
syntax is:
sendftp
user and pw are given as parameters of script.
path parameter is optional (remote user's home dir will be used as default)
hope this helps.
antonio.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2006 09:43 PM
05-10-2006 09:43 PM