- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- 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
Discussions
Discussions
Forums
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
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
тАО07-21-2005 07:29 AM
тАО07-21-2005 07:29 AM
shell script
thank you...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-21-2005 07:32 AM
тАО07-21-2005 07:32 AM
Re: shell script
http://forums2.itrc.hp.com/service/forums/questionanswer.do?threadId=937577
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-21-2005 07:35 AM
тАО07-21-2005 07:35 AM
Re: shell script
There are a tone of examples if use the search function of the forumns.
Here is one of a dozen ways to do this:
#! /usr/bin/ksh
date > /home/ftp.log
ftp -n -v << EOF >> /home/ftp.log
open servername
user username password
put /home/TEST.JOB
quit
EOF
exit
The log file will containe the results snd output of the job.
the EOF signifies to perform all instructions until the next occurrence of EOF.
While this uses a hard coded servername, username, password, it is preferable to use a .netrc file for these values. Man .netrc.
Best of luck.
Regards,
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-21-2005 07:36 AM
тАО07-21-2005 07:36 AM
Re: shell script
#!/bin/sh
HOST='ftp.users.abc.net'
USER='yourid'
PASSWD='yourpw'
FILE='file.txt'
ftp -n $HOST <
quote PASS $PASSWD
put $FILE
quit
END_SCRIPT
exit 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-21-2005 07:37 AM
тАО07-21-2005 07:37 AM
Re: shell script
Invoke as perl ftpget.pl -u for full usage. If you create a .netrc file, it will automatically read the password or you can pass it on the command line.
ftpget.pl -h remotehost -l mickey -p topsecret -B -d /xxx/yyy file1 file2
STAT=${?}
if [[ ${STAT} -eq 0 ]]
then
echo "All was well"
else
echo "FTP failed; status ${STAT}" >&2
fi
Error checking, retries, are built right in.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-21-2005 07:40 AM
тАО07-21-2005 07:40 AM
Re: shell script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-21-2005 08:35 AM
тАО07-21-2005 08:35 AM
Re: shell script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-21-2005 08:43 AM
тАО07-21-2005 08:43 AM
Re: shell script
#! /usr/bin/ksh
date > /home/ftp.log
ftp -n -v << EOF >> /home/ftp.log
open servername
user username password
put /home/TEST.JOB
quit
EOF
"ERROR CHECKING LOGIC GOES HERE"
exit
Unfortunately, there is little perl scripting used here and this is our primary skeleton of an ftp, except as noted, we will use a .netrc and eliminate the hardcoding mentioned before.
Best of luck.
Regards,
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-21-2005 10:38 AM
тАО07-21-2005 10:38 AM
Re: shell script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-21-2005 03:21 PM
тАО07-21-2005 03:21 PM
Re: shell script
http://forums2.itrc.hp.com/service/forums/questionanswer.do?threadId=940553
hth.