Computing.Net > Forums > Unix > FTP Scripst in HP-UX

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

FTP Scripst in HP-UX

Reply to Message Icon

Name: emedina01
Date: July 7, 2005 at 13:17:10 Pacific
OS: windows XP
CPU/Ram: 1.8 GHZ / 256 MB
Comment:

Hi folks,

Some one know who create a FTP script under HP-UX 11..? and who pass parameters, a mean, for example, I need to pass the file name for transport this file to another server.

Thanks a lot

Eduardo Medina
Juarez , Mexico



Sponsored Link
Ads by Google

Response Number 1
Name: David Perry
Date: July 8, 2005 at 05:06:30 Pacific
Reply:

#!/bin/sh

ftpput () {
remotehost=$1
username=$2
password=$3
filename=$4
{ echo "open $remotehost
user $username $password
hash
cd /remote/directory
put $filename
close"
} | ftp -i -n -v 2>&1 | tee /tmp/ftplog
}

ftpput hostname username password filetosend


0

Response Number 2
Name: Sherwani
Date: July 12, 2005 at 07:00:56 Pacific
Reply:

You can use this document to script an FTP file transfer. The basic idea is shown here.
ftp -i -v -n ftp.keekar.com (redirector} end_ftpuser keekar mypasswordbinary
lcd /scripts/download
cd /scripts
get auto_ftp_xfer.ksh
bye
END_FTP


0

Response Number 3
Name: rajeshsu
Date: July 26, 2005 at 23:02:57 Pacific
Reply:

There are two ways

1. First method is

#!/bin/sh
ftp -n localhost <<!
quote user YourUserName
quote pass YourPassword
binary
put file1 file2
quit
!
1. Second method is

ftp -n -i -v ftp.url.com <<!
user username password
cd /data/shared/
lcd /data/import
mget vcm*.dat
bye
!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: FTP Scripst in HP-UX

Attaching files to e-mails in HP-UX www.computing.net/answers/unix/attaching-files-to-emails-in-hpux/2447.html

snoop in HP-UX www.computing.net/answers/unix/snoop-in-hpux/4676.html

Automate time change in hp-ux www.computing.net/answers/unix/automate-time-change-in-hpux/3728.html