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
01-11-2005 02:36 PM
01-11-2005 02:36 PM
I want to copy a file from a HP-UX server to a Netware server inside a script. I thought maybe I could do this with "ftp", but am uncertain how to string the command together. Any suggestions? Thanks.
Bob
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2005 03:00 PM
01-11-2005 03:00 PM
Re: FTP
ftp -n ipaddress << !
user
bye
!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2005 04:30 PM
01-11-2005 04:30 PM
Re: FTP
However, I cannot get it to pass the user information. Any thoughts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2005 05:00 PM
01-11-2005 05:00 PM
SolutionYou can't just cut and paste his script as posted.
Here is a working example.
As bad a security as this is, set two variables before executing this code:
USERNAME=userid
PASSWORD=actualpassword
export USERNAME
export PASSWORD
ftp -nv ${SERVER} << FTPEOF > /tmp/temp_log.$$
user ${USERNAME} ${PASSWORD}
#Get file
get $1
quit
FTPEOF
If this script does not work, make sure the ftpd server is working on the Netware Server.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2005 05:52 PM
01-11-2005 05:52 PM
Re: FTP
$ echo
then you can call this in the script
#!/bin/sh
USERNAME=username
PASSWORD=`crypt pass
ftp -n ipaddress << !
user $USERNAME $PASSWORD
commands.......
bye
!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2005 07:24 PM
01-11-2005 07:24 PM
Re: FTP
USERNAME=someone
PASSWORD=passwd
WORKSTATION=IP OR HOST
ftp -nv ${WORKSTATION} << FTPEOF > /tmp/temp_log
user ${USERNAME} ${PASSWORD}
#Get file
get $1
quit
FTPEOF
let try .
tienna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2005 07:24 PM
01-11-2005 07:24 PM
Re: FTP
USERNAME=someone
PASSWORD=passwd
WORKSTATION=IP OR HOST
ftp -nv ${WORKSTATION} << FTPEOF > /tmp/temp_log
user ${USERNAME} ${PASSWORD}
#Get file
put file
quit
FTPEOF
let try .
tienna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2005 08:37 PM
01-11-2005 08:37 PM
Re: FTP
creat file with ftp command a files you want to create and launch ftp with i n v options :
/usr/bin/ftp -i -n -v < /home/sladky/CRON_MSD/ftp_sundance1.txt
cat ftp_sundance1.txt
open 10.32.113.177
user user1 passwd
bin
hash
prompt off
cd IN2
dir
mput -.txt
bye
rgds Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2005 11:33 PM
01-11-2005 11:33 PM
Re: FTP
#/!/sbin/sh
#change these parameter for your environment
host_ip=172.21.xx.xxx
user_name=xxxxxx
pass_word=xxxxxx
dir=/home/sysadmin/crhcmax2
ldir=/home/sysadmin
Date=`date +%m%d`
LOG_NM=/home/sysadmin/ftpcrhcmax1.log
file_name=crhcmax2${Date}.html
mail_file=*.mail.crhcmax2
ftp -nv $host_ip << FTPEOF > $LOG_NM
user $user_name $pass_word
cd $dir
lcd $ldir
put $file_name
mput $mail_file
quit
FTPEOF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2005 09:11 AM
01-13-2005 09:11 AM