FTP Scripst in HP-UX

Score
0
Vote Up
July 7, 2005 at 13:17:10 Pacific
Specs: windows XP, 1.8 GHZ / 256 MB

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


Reply ↓  Report •


#1
Vote Down
Score
0
Vote Up
July 8, 2005 at 05:06:30 Pacific

#!/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


Reply ↓  Report •

#2
Vote Down
Score
0
Vote Up
July 12, 2005 at 07:00:56 Pacific

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

Reply ↓  Report •

#3
Vote Down
Score
1
Vote Up
July 26, 2005 at 23:02:57 Pacific

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
!


Reply ↓  Report •

Reply to Message Icon Start New Discussion
Related Posts

« Need to find the string Script running or not »

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

Ask the Community!
Describe your Problem
Example: Hard Drive Not Detected on My PC